Package com.ibm.wala.ipa.summaries
Class BypassSyntheticClass
- java.lang.Object
-
- com.ibm.wala.classLoader.SyntheticClass
-
- com.ibm.wala.ipa.summaries.BypassSyntheticClass
-
- All Implemented Interfaces:
IClass,IClassHierarchyDweller
public class BypassSyntheticClass extends SyntheticClass
A synthetic implementation of a class
-
-
Constructor Summary
Constructors Constructor Description BypassSyntheticClass(IClass realType, IClassLoader loader, IClassHierarchy cha)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object arg0)Collection<IField>getAllFields()Compute the instance and static fields declared by this class or any of its superclasses.Collection<IClass>getAllImplementedInterfaces()Collection<IField>getAllInstanceFields()Compute the instance fields declared by this class or any of its superclasses.Collection<IMethod>getAllMethods()Compute the methods declared by this class or any of its superclasses.Collection<IField>getAllStaticFields()Compute the static fields declared by this class or any of its superclasses.Collection<Annotation>getAnnotations()get annotations, if anyIMethodgetClassInitializer()IClassLoadergetClassLoader()By default, a synthetic class is "loaded" by the primordial loader.Collection<IField>getDeclaredInstanceFields()Compute the instance fields declared by this class.Collection<IMethod>getDeclaredMethods()Collection<IField>getDeclaredStaticFields()Collection<IClass>getDirectInterfaces()IFieldgetField(Atom name)Finds a field.IMethodgetMethod(Selector selector)Finds method matching signature.intgetModifiers()Return the integer that encodes the class's modifiers, as defined by the JVM specificationstatic TypeNamegetName(TypeReference T)IClassgetRealType()ReadergetSource()StringgetSourceFileName()IClassgetSuperclass()inthashCode()booleanisPrivate()booleanisPublic()booleanisReferenceType()Does 'this' refer to a reference type? If not, then it refers to a primitive type.booleanisSyntheticImplentor()StringtoString()-
Methods inherited from class com.ibm.wala.classLoader.SyntheticClass
getClassHierarchy, getField, getName, getReference, isAbstract, isArrayClass, isInterface
-
-
-
-
Constructor Detail
-
BypassSyntheticClass
public BypassSyntheticClass(IClass realType, IClassLoader loader, IClassHierarchy cha) throws NullPointerException, NullPointerException
- Throws:
NullPointerException
-
-
Method Detail
-
getName
public static TypeName getName(TypeReference T)
- Parameters:
T- a type reference- Returns:
- a synthetic class name to represent the synthetic form of this type
- Throws:
IllegalArgumentException- if T is null
-
getClassLoader
public IClassLoader getClassLoader()
Description copied from class:SyntheticClassBy default, a synthetic class is "loaded" by the primordial loader. Subclasses may override as necessary.- Specified by:
getClassLoaderin interfaceIClass- Overrides:
getClassLoaderin classSyntheticClass- Returns:
- the object that represents the defining class loader for this class.
- See Also:
IClass.getClassLoader()
-
getSuperclass
public IClass getSuperclass()
- Returns:
- the superclass, or null if java.lang.Object
-
getAllImplementedInterfaces
public Collection<IClass> 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
public IMethod getMethod(Selector selector)
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
public IField getField(Atom name)
Description copied from interface:IClassFinds a field.
-
getSourceFileName
public String getSourceFileName()
- Specified by:
getSourceFileNamein interfaceIClass- Overrides:
getSourceFileNamein classSyntheticClass- Returns:
- String holding the name of the source file that defined this class, or null if none found
-
getClassInitializer
public IMethod getClassInitializer()
- Returns:
- the method that is this class's initializer, or null if none
-
getDeclaredMethods
public Collection<IMethod> getDeclaredMethods()
- Returns:
- an Iterator of the IMethods declared by this class.
-
getDeclaredInstanceFields
public Collection<IField> getDeclaredInstanceFields()
Description copied from interface:IClassCompute the instance fields declared by this class.- Returns:
- Collection of IFields
-
getDeclaredStaticFields
public Collection<IField> getDeclaredStaticFields()
- Returns:
- Collection of IField
-
isSyntheticImplentor
public boolean isSyntheticImplentor()
-
getRealType
public IClass getRealType()
-
equals
public boolean equals(Object arg0)
- Overrides:
equalsin classSyntheticClass
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSyntheticClass
-
getModifiers
public int getModifiers() throws UnimplementedErrorDescription 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
- Throws:
UnimplementedError
-
isReferenceType
public boolean isReferenceType()
Description copied from interface:IClassDoes 'this' refer to a reference type? If not, then it refers to a primitive type.
-
getDirectInterfaces
public Collection<IClass> getDirectInterfaces() throws UnimplementedError
- Returns:
- Collection of (IClass) interfaces this class directly implements. If this class is an interface, returns the interfaces it immediately extends.
- Throws:
UnimplementedError
-
getAllInstanceFields
public Collection<IField> getAllInstanceFields()
Description copied from interface:IClassCompute the instance fields declared by this class or any of its superclasses.
-
getAllStaticFields
public Collection<IField> getAllStaticFields()
Description copied from interface:IClassCompute the static fields declared by this class or any of its superclasses.
-
getAllMethods
public Collection<IMethod> getAllMethods()
Description copied from interface:IClassCompute the methods declared by this class or any of its superclasses.
-
getAllFields
public Collection<IField> getAllFields()
Description copied from interface:IClassCompute the instance and static fields declared by this class or any of its superclasses.
-
isPublic
public boolean isPublic()
- Returns:
- true iff this class is public
-
isPrivate
public boolean isPrivate()
- Returns:
- true iff this class is private
-
getSource
public Reader getSource()
- Specified by:
getSourcein interfaceIClass- Overrides:
getSourcein classSyntheticClass- Returns:
- String representing the source file holding this class, or null if not found
-
getAnnotations
public Collection<Annotation> getAnnotations()
Description copied from interface:IClassget annotations, if any- Specified by:
getAnnotationsin interfaceIClass- Overrides:
getAnnotationsin classSyntheticClass
-
-