Class FSTClazzLineageInfo

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

public final class FSTClazzLineageInfo
extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Comparator<java.lang.Class> SPECIFICITY_CLASS_COMPARATOR  
    • Method Summary

      Modifier and Type Method Description
      static java.lang.Class<?>[] getLineage​(java.lang.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).
      static int getSpecificity​(java.lang.Class<?> clazz)
      Returns the specificity of the specified class as defined above.

      Methods inherited from class java.lang.Object

      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Details

    • Method Details

      • getSpecificity

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

        public static java.lang.Class<?>[] getLineage​(java.lang.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).