Class CSObjs

java.lang.Object
pascal.taie.analysis.pta.plugin.util.CSObjs

public final class CSObjs extends Object
Static utility methods for CSObjs.
  • Method Details

    • hasDescriptor

      public static boolean hasDescriptor(CSObj csObj, Descriptor desc)
      Returns:
      true if csObj is MockObj and it has descriptor desc.
    • toString

      @Nullable public static String toString(CSObj csObj)
      Converts a CSObj of string constant to corresponding String. If the object is not a string constant, then return null.
    • toClass

      @Nullable public static JClass toClass(CSObj csObj)
      Converts a CSObj of class to corresponding JClass. If the object is not a class constant, then return null.
    • toConstructor

      @Nullable public static JMethod toConstructor(CSObj csObj)
      Converts a CSObj of java.lang.reflect.Constructor to corresponding JMethod. If the object does not represent a Constructor, then return null.
    • toMethod

      @Nullable public static JMethod toMethod(CSObj csObj)
      Converts a CSObj of java.lang.reflect.Method to corresponding JMethod. If the object does not represent a Method, then return null.
    • toField

      @Nullable public static JField toField(CSObj csObj)
      Converts a CSObj of java.lang.reflect.Method to corresponding JMethod. If the object does not represent a Method, then return null.
    • toType

      @Nullable public static Type toType(CSObj csObj)
      Converts a CSObj of class to corresponding type. If the object is not a class constant, then return null.
    • toMethodType

      @Nullable public static MethodType toMethodType(CSObj csObj)
      Converts a CSObj of MethodType to corresponding MethodType. If the object is not a MethodType, then return null.
    • toMethodHandle

      @Nullable public static MethodHandle toMethodHandle(CSObj csObj)
      Converts a CSObj of MethodHandle constant to corresponding MethodHandle. If the object is not a MethodHandle constant, then return null.
    • toAnnotation

      public static Annotation toAnnotation(CSObj csObj)
      Converts a CSObj of an Annotation to the Annotation. If the object is not an Annotation object, then return null.
    • isArray

      public static boolean isArray(CSObj csObj)
      Returns:
      true if given csObj is an array object.