Class FSTClazzLineageInfo

java.lang.Object
org.nustaq.serialization.FSTClazzLineageInfo

public final class FSTClazzLineageInfo extends Object
Represents a ordered class lineage based on the specificity of classes, where specificity is defined as follows:
  • null has specificity 0
  • java.lang.Object has specificity 0
  • an interface without any extends clause has specificity 1
  • a class or interface has a specificity of 1 + the specificity of the superclass + the sum of the specificity of the implemented interfaces.
  • Author:
    Odd Moeller 2017-03-08.
    • Field Details

      • SPECIFICITY_CLASS_COMPARATOR

        public static final Comparator<Class> SPECIFICITY_CLASS_COMPARATOR
    • Method Details

      • getSpecificity

        public static int getSpecificity(Class<?> clazz)
        Returns the specificity of the specified class as defined above.
      • getLineage

        public static Class<?>[] getLineage(Class<?> clazz)
        Returns the lineage of the specified class ordered by specificity (the class itself is at position 0 since it is most specific in its lineage).