Package de.bild.codec

Class TypesModel

java.lang.Object
de.bild.codec.TypesModel

public class TypesModel extends Object
This class holds a list of all classes relevant for the pojo model. Additionally a class hierarchy model is build to detect polymorphic structures.
  • Field Details

  • Constructor Details

  • Method Details

    • getClassHierarchyNodeForType

      protected TypesModel.ClassHierarchyNode getClassHierarchyNodeForType(Type type)
      Parameters:
      type - a type
      Returns:
      the type hierarchy (lower bound within types model bounds) for the given type
    • getAssignableTypesWithinClassHierarchy

      public Set<Type> getAssignableTypesWithinClassHierarchy(Type type)
      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