Class TargetClassResolver
java.lang.Object
cz.cvut.kbss.jsonld.deserialization.util.TargetClassResolver
Resolves the type of instance into which a JSON-LD object will be deserialized.
-
Constructor Summary
ConstructorsConstructorDescriptionTargetClassResolver
(TypeMap typeMap) TargetClassResolver
(TypeMap typeMap, TargetClassResolverConfig config) -
Method Summary
Modifier and TypeMethodDescription<T> Class<? extends T>
getTargetClass
(Class<T> expectedClass, Collection<String> types) Resolves object deserialization target class based on the specified type info.
-
Constructor Details
-
TargetClassResolver
-
TargetClassResolver
-
-
Method Details
-
getTargetClass
Resolves object deserialization target class based on the specified type info.- Type Parameters:
T
- The type of the expected target class- Parameters:
expectedClass
- Expected class as specified by deserialization return type of field typetypes
- Types of the JSON-LD object to deserialize- Returns:
- Resolved target class. It has to be a subtype of the
expectedClass
- Throws:
TargetTypeException
- If the resulting candidate is not assignable to the expected class or it cannot be determined
-