Package soot

Class ModuleRefType

  • All Implemented Interfaces:
    Serializable, Comparable<RefType>, Numberable, Switchable

    public class ModuleRefType
    extends RefType
    A class that models Java's reference types. RefTypes are parameterized by a class name. Two RefType are equal iff they are parameterized by the same class name as a String. Extends RefType in order to deal with Java 9 modules.
    Author:
    Andreas Dann
    See Also:
    Serialized Form
    • Constructor Detail

      • ModuleRefType

        protected ModuleRefType​(String className,
                                String moduleName)
    • Method Detail

      • v

        public static RefType v​(String className,
                                com.google.common.base.Optional<String> moduleName)
      • getModuleName

        public String getModuleName()
      • getSootClass

        public SootClass getSootClass()
        Get the SootClass object corresponding to this RefType.
        Overrides:
        getSootClass in class RefType
        Returns:
        the corresponding SootClass
      • merge

        public Type merge​(Type other,
                          Scene cm)
        Returns the least common superclass of this type and other.
        Overrides:
        merge in class RefType
      • getArrayElementType

        public Type getArrayElementType()
        Description copied from class: RefLikeType
        If I have a variable x of declared type t, what is a good declared type for the expression ((Object[]) x)[i]? The getArrayElementType() method in RefLikeType was introduced even later to answer this question for all classes implementing RefLikeType. If t is an array, then the answer is the same as getElementType(). But t could also be Object, Serializable, or Cloneable, which can all hold any array, so then the answer is Object.
        Overrides:
        getArrayElementType in class RefType