Package de.bild.codec
Class TypesModel
java.lang.Object
de.bild.codec.TypesModel
This class holds a list of all classes relevant for the pojo model.
Additionally a class hierarchy model is build to detect polymorphic structures.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<Class<?>,TypesModel.ClassHierarchyNode> protected final ClassResolverprotected final Set<Class<? extends Annotation>> -
Constructor Summary
ConstructorsConstructorDescriptionTypesModel(Set<Class<?>> classes, Set<String> packages, Set<Class<? extends Annotation>> ignoreAnnotations, Set<Predicate<String>> ignoreTypesMatchingClassNamePredicates, Set<Class<?>> ignoreClasses, ClassResolver specializedClassResolver) -
Method Summary
Modifier and TypeMethodDescriptionThis method is the core functionality to find polymorphic type structures.protected TypesModel.ClassHierarchyNode
-
Field Details
-
allClasses
-
classHierarchy
-
ignoreAnnotations
-
ignoreClasses
-
classResolver
-
ignoreTypesMatchingClassNamePredicates
-
-
Constructor Details
-
TypesModel
-
-
Method Details
-
getClassHierarchyNodeForType
- Parameters:
type- a type- Returns:
- the type hierarchy (lower bound within types model bounds) for the given type
-
getAssignableTypesWithinClassHierarchy
This method is the core functionality to find polymorphic type structures. Given a type, the set of all known classes will be searched for matching types. A matching type for a given type only matches if all generic parameter conditions are met, more precise if the potential valid type is assignable the original type.- Parameters:
type- the type for with sub types should be found- Returns:
- a set of matching types within know set of registered model classes
-