Class SyntheticClass

java.lang.Object
com.ibm.wala.classLoader.SyntheticClass
All Implemented Interfaces:
IClass, IClassHierarchyDweller
Direct Known Subclasses:
AndroidModelClass, BypassSyntheticClass, FakeRootClass, LambdaSummaryClass, PhantomClass

public abstract class SyntheticClass extends Object implements IClass
An IClass that exists nowhere in bytecode.
  • Constructor Details

  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getClassLoader

      public IClassLoader getClassLoader()
      By default, a synthetic class is "loaded" by the primordial loader. Subclasses may override as necessary.
      Specified by:
      getClassLoader in interface IClass
      Returns:
      the object that represents the defining class loader for this class.
    • isInterface

      public boolean isInterface()
      Description copied from interface: IClass
      Is this class a Java interface?
      Specified by:
      isInterface in interface IClass
    • isAbstract

      public boolean isAbstract()
      Specified by:
      isAbstract in interface IClass
      Returns:
      true iff this class is abstract
    • isSynthetic

      public boolean isSynthetic()
      Specified by:
      isSynthetic in interface IClass
      Returns:
      true iff this class is synthetic, i.e., compiler-generated
    • getReference

      public TypeReference getReference()
      Specified by:
      getReference in interface IClass
      Returns:
      canonical TypeReference corresponding to this class
    • getSourceFileName

      public String getSourceFileName()
      Specified by:
      getSourceFileName in interface IClass
      Returns:
      String holding the name of the source file that defined this class, or null if none found
    • getSource

      public Reader getSource()
      Specified by:
      getSource in interface IClass
      Returns:
      String representing the source file holding this class, or null if not found
    • isArrayClass

      public boolean isArrayClass()
      Specified by:
      isArrayClass in interface IClass
      Returns:
      true iff the class is an array class.
    • getClassHierarchy

      public IClassHierarchy getClassHierarchy()
      Specified by:
      getClassHierarchy in interface IClassHierarchyDweller
    • getName

      public TypeName getName()
      Specified by:
      getName in interface IClass
      Returns:
      the TypeName for this class
    • getField

      public IField getField(Atom name, TypeName typeName)
      we assume synthetic classes do not need to have multiple fields with the same name.
      Specified by:
      getField in interface IClass
    • getAnnotations

      public Collection<Annotation> getAnnotations()
      Description copied from interface: IClass
      get annotations, if any
      Specified by:
      getAnnotations in interface IClass