Class SummaryClassShell
java.lang.Object
com.ibm.wala.classLoader.SyntheticClass
com.ibm.wala.ipa.summaries.SummaryClassShell
- All Implemented Interfaces:
IClass, IClassHierarchyDweller
A minimal standalone shell
IClass for a type modeled only by a summary. Unlike BypassSyntheticClass, which wraps an existing "real" type, a shell stands on its own and is
positioned in the hierarchy at an explicitly declared superclass. Its purpose is to occupy a
place in the class hierarchy so that source subclasses resolve their base. It carries no fields;
it exposes only the methods given to it as summaries (typically the
<method> children of the <class> it was materialized from), as SummarizedMethods. See #1957.-
Constructor Summary
ConstructorsConstructorDescriptionSummaryClassShell(TypeReference type, IClassHierarchy cha, TypeReference superReference) SummaryClassShell(TypeReference type, IClassHierarchy cha, TypeReference superReference, Collection<MethodSummary> methods) -
Method Summary
Modifier and TypeMethodDescriptionCompute the instance and static fields declared by this class or any of its superclasses.Compute the instance fields declared by this class or any of its superclasses.Collection<? extends IMethod> Compute the methods declared by this class or any of its superclasses.Compute the static fields declared by this class or any of its superclasses.Compute the instance fields declared by this class.Collection<? extends IMethod> Finds a field.Finds method matching signature.intReturn the integer that encodes the class's modifiers, as defined by the JVM specificationbooleanbooleanisPublic()booleanDoes 'this' refer to a reference type? If not, then it refers to a primitive type.toString()Methods inherited from class SyntheticClass
equals, getAnnotations, getClassHierarchy, getClassLoader, getField, getName, getReference, getSource, getSourceFileName, hashCode, isAbstract, isArrayClass, isInterface, isSyntheticModifier and TypeMethodDescriptionbooleanget annotations, if anyBy default, a synthetic class is "loaded" by the primordial loader.we assume synthetic classes do not need to have multiple fields with the same name.getName()inthashCode()booleanbooleanbooleanIs this class a Java interface?boolean
-
Constructor Details
-
SummaryClassShell
- Parameters:
type- the type this shell representscha- the governing class hierarchysuperReference- the declared superclass, ornullfor the language root type
-
SummaryClassShell
public SummaryClassShell(TypeReference type, IClassHierarchy cha, TypeReference superReference, Collection<MethodSummary> methods) - Parameters:
type- the type this shell representscha- the governing class hierarchysuperReference- the declared superclass, ornullfor the language root typemethods- summaries for the shell's own declared methods
-
-
Method Details
-
getSuperclass
- Returns:
- the superclass, or null if java.lang.Object
-
getDirectInterfaces
- Returns:
- Collection of (IClass) interfaces this class directly implements. If this class is an interface, returns the interfaces it immediately extends.
-
getAllImplementedInterfaces
- Returns:
- Collection of (IClass) interfaces this class implements, including all ancestors of interfaces immediately implemented. If this class is an interface, it returns all super-interfaces.
-
getMethod
Description copied from interface:IClassFinds method matching signature. Delegates to superclass if not found.- Parameters:
selector- a method signature- Returns:
- IMethod from this class matching the signature; null if not found in this class or any superclass.
-
getField
-
getClassInitializer
- Returns:
- the method that is this class's initializer, or null if none
-
getDeclaredMethods
- Returns:
- an Iterator of the IMethods declared by this class.
-
getDeclaredInstanceFields
Description copied from interface:IClassCompute the instance fields declared by this class.- Returns:
- Collection of IFields
-
getDeclaredStaticFields
- Returns:
- Collection of IField
-
getAllInstanceFields
Description copied from interface:IClassCompute the instance fields declared by this class or any of its superclasses. -
getAllStaticFields
Description copied from interface:IClassCompute the static fields declared by this class or any of its superclasses. -
getAllFields
Description copied from interface:IClassCompute the instance and static fields declared by this class or any of its superclasses. -
getAllMethods
Description copied from interface:IClassCompute the methods declared by this class or any of its superclasses. -
isReferenceType
public boolean isReferenceType()Description copied from interface:IClassDoes 'this' refer to a reference type? If not, then it refers to a primitive type. -
isPublic
public boolean isPublic()- Returns:
- true iff this class is public
-
isPrivate
public boolean isPrivate()- Returns:
- true iff this class is private
-
getModifiers
public int getModifiers()Description copied from interface:IClassReturn the integer that encodes the class's modifiers, as defined by the JVM specification- Returns:
- the integer that encodes the class's modifiers, as defined by the JVM specification
-
toString
-