Class DeepSubtypeAnalysis


  • public class DeepSubtypeAnalysis
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.apache.bcel.classfile.JavaClass collection  
      private static org.apache.bcel.classfile.JavaClass comparator  
      private static boolean DEBUG  
      private static org.apache.bcel.classfile.JavaClass map  
      private static org.apache.bcel.classfile.JavaClass remote  
      private static org.apache.bcel.classfile.JavaClass serializable  
      private static java.lang.ClassNotFoundException storedException  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double deepInstanceOf​(java.lang.String x, java.lang.String y)
      Given two JavaClasses, try to estimate the probability that an reference of type x is also an instance of type y.
      static double deepInstanceOf​(org.apache.bcel.classfile.JavaClass x, org.apache.bcel.classfile.JavaClass y)
      Given two JavaClasses, try to estimate the probability that an reference of type x is also an instance of type y.
      static java.lang.String getComponentClass​(java.lang.String refSig)  
      static java.lang.String getComponentClass​(org.apache.bcel.generic.ReferenceType refType)  
      static org.apache.bcel.generic.ReferenceType getLeastSerializableTypeComponent​(org.apache.bcel.generic.ReferenceType type)  
      static double isDeepRemote​(java.lang.String refSig)  
      static double isDeepRemote​(org.apache.bcel.generic.ReferenceType refType)  
      static double isDeepSerializable​(java.lang.String refSig)  
      static double isDeepSerializable​(org.apache.bcel.classfile.JavaClass x)  
      static double isDeepSerializable​(org.apache.bcel.generic.ReferenceType type)  
      private static boolean isPrimitiveComponentClass​(java.lang.String refSig)  
      • Methods inherited from class java.lang.Object

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

      • serializable

        private static org.apache.bcel.classfile.JavaClass serializable
      • collection

        private static org.apache.bcel.classfile.JavaClass collection
      • comparator

        private static org.apache.bcel.classfile.JavaClass comparator
      • map

        private static org.apache.bcel.classfile.JavaClass map
      • remote

        private static org.apache.bcel.classfile.JavaClass remote
      • storedException

        private static java.lang.ClassNotFoundException storedException
      • DEBUG

        private static final boolean DEBUG
    • Constructor Detail

      • DeepSubtypeAnalysis

        public DeepSubtypeAnalysis()
    • Method Detail

      • isDeepSerializable

        public static double isDeepSerializable​(org.apache.bcel.generic.ReferenceType type)
                                         throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • getLeastSerializableTypeComponent

        public static org.apache.bcel.generic.ReferenceType getLeastSerializableTypeComponent​(org.apache.bcel.generic.ReferenceType type)
                                                                                       throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • isDeepSerializable

        public static double isDeepSerializable​(@DottedClassName
                                                java.lang.String refSig)
                                         throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • isDeepRemote

        public static double isDeepRemote​(org.apache.bcel.generic.ReferenceType refType)
      • isDeepRemote

        public static double isDeepRemote​(java.lang.String refSig)
      • isPrimitiveComponentClass

        private static boolean isPrimitiveComponentClass​(java.lang.String refSig)
      • getComponentClass

        public static java.lang.String getComponentClass​(org.apache.bcel.generic.ReferenceType refType)
      • getComponentClass

        public static java.lang.String getComponentClass​(java.lang.String refSig)
      • isDeepSerializable

        public static double isDeepSerializable​(org.apache.bcel.classfile.JavaClass x)
                                         throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • deepInstanceOf

        public static double deepInstanceOf​(@DottedClassName
                                            java.lang.String x,
                                            @DottedClassName
                                            java.lang.String y)
                                     throws java.lang.ClassNotFoundException
        Given two JavaClasses, try to estimate the probability that an reference of type x is also an instance of type y. Will return 0 only if it is impossible and 1 only if it is guaranteed.
        Parameters:
        x - Known type of object
        y - Type queried about
        Returns:
        0 - 1 value indicating probability
        Throws:
        java.lang.ClassNotFoundException
      • deepInstanceOf

        public static double deepInstanceOf​(org.apache.bcel.classfile.JavaClass x,
                                            org.apache.bcel.classfile.JavaClass y)
                                     throws java.lang.ClassNotFoundException
        Given two JavaClasses, try to estimate the probability that an reference of type x is also an instance of type y. Will return 0 only if it is impossible and 1 only if it is guaranteed.
        Parameters:
        x - Known type of object
        y - Type queried about
        Returns:
        0 - 1 value indicating probability
        Throws:
        java.lang.ClassNotFoundException