Package com.ibm.wala.ipa.callgraph.impl
Class FakeRootClass
- java.lang.Object
-
- com.ibm.wala.classLoader.SyntheticClass
-
- com.ibm.wala.ipa.callgraph.impl.FakeRootClass
-
- All Implemented Interfaces:
IClass
,IClassHierarchyDweller
public class FakeRootClass extends SyntheticClass
A synthetic class for the fake root method.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeReference
FAKE_ROOT_CLASS
-
Constructor Summary
Constructors Constructor Description FakeRootClass(IClassHierarchy cha)
FakeRootClass(TypeReference typeRef, IClassHierarchy cha)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMethod(IMethod m)
void
addStaticField(Atom name, TypeReference fieldType)
Collection<IClass>
getAllAncestorInterfaces()
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.IMethod
getClassInitializer()
Collection<IField>
getDeclaredInstanceFields()
Compute the instance fields declared by this class.Collection<IMethod>
getDeclaredMethods()
Collection<IField>
getDeclaredStaticFields()
Collection<IClass>
getDirectInterfaces()
IField
getField(Atom name)
Finds a field.IMethod
getMethod(Selector selector)
Finds method matching signature.int
getModifiers()
Return the integer that encodes the class's modifiers, as defined by the JVM specificationReader
getSource()
IClass
getSuperclass()
boolean
isPrivate()
boolean
isPublic()
boolean
isReferenceType()
Does 'this' refer to a reference type? If not, then it refers to a primitive type.-
Methods inherited from class com.ibm.wala.classLoader.SyntheticClass
equals, getAnnotations, getClassHierarchy, getClassLoader, getField, getName, getReference, getSourceFileName, hashCode, isAbstract, isArrayClass, isInterface
-
-
-
-
Field Detail
-
FAKE_ROOT_CLASS
public static final TypeReference FAKE_ROOT_CLASS
-
-
Constructor Detail
-
FakeRootClass
public FakeRootClass(IClassHierarchy cha)
-
FakeRootClass
public FakeRootClass(TypeReference typeRef, IClassHierarchy cha)
-
-
Method Detail
-
addMethod
public void addMethod(IMethod m)
-
addStaticField
public void addStaticField(Atom name, TypeReference fieldType)
-
getModifiers
public int getModifiers() throws UnsupportedOperationException
Description copied from interface:IClass
Return 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:
UnsupportedOperationException
-
getSuperclass
public IClass getSuperclass() throws UnsupportedOperationException
- Returns:
- the superclass, or null if java.lang.Object
- Throws:
UnsupportedOperationException
-
getAllImplementedInterfaces
public Collection<IClass> getAllImplementedInterfaces() throws UnsupportedOperationException
- 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.
- Throws:
UnsupportedOperationException
-
getAllAncestorInterfaces
public Collection<IClass> getAllAncestorInterfaces() throws UnsupportedOperationException
- Throws:
UnsupportedOperationException
-
getMethod
public IMethod getMethod(Selector selector) throws UnsupportedOperationException
Description copied from interface:IClass
Finds 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.
- Throws:
UnsupportedOperationException
-
getField
public IField getField(Atom name)
Description copied from interface:IClass
Finds a field.
-
getClassInitializer
public IMethod getClassInitializer() throws UnimplementedError
- Returns:
- the method that is this class's initializer, or null if none
- Throws:
UnimplementedError
-
getDeclaredMethods
public Collection<IMethod> getDeclaredMethods() throws UnsupportedOperationException
- Returns:
- an Iterator of the IMethods declared by this class.
- Throws:
UnsupportedOperationException
-
getDeclaredInstanceFields
public Collection<IField> getDeclaredInstanceFields() throws UnsupportedOperationException
Description copied from interface:IClass
Compute the instance fields declared by this class.- Returns:
- Collection of IFields
- Throws:
UnsupportedOperationException
-
getDeclaredStaticFields
public Collection<IField> getDeclaredStaticFields()
- Returns:
- Collection of IField
-
isReferenceType
public boolean isReferenceType()
Description copied from interface:IClass
Does 'this' refer to a reference type? If not, then it refers to a primitive type.
-
getDirectInterfaces
public Collection<IClass> getDirectInterfaces() throws UnsupportedOperationException
- Returns:
- Collection of (IClass) interfaces this class directly implements. If this class is an interface, returns the interfaces it immediately extends.
- Throws:
UnsupportedOperationException
-
getAllInstanceFields
public Collection<IField> getAllInstanceFields()
Description copied from interface:IClass
Compute the instance fields declared by this class or any of its superclasses.
-
getAllStaticFields
public Collection<IField> getAllStaticFields()
Description copied from interface:IClass
Compute the static fields declared by this class or any of its superclasses.
-
getAllMethods
public Collection<IMethod> getAllMethods()
Description copied from interface:IClass
Compute the methods declared by this class or any of its superclasses.
-
getAllFields
public Collection<IField> getAllFields()
Description copied from interface:IClass
Compute 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:
getSource
in interfaceIClass
- Overrides:
getSource
in classSyntheticClass
- Returns:
- String representing the source file holding this class, or null if not found
-
-