T - type of classloader which loads this format of class.public abstract class BytecodeClass<T extends IClassLoader> extends Object implements IClass
| Modifier and Type | Field and Description |
|---|---|
protected Collection<IClass> |
allInterfaces
The IClasses that represent all interfaces this class implements (if it's a class) or extends (it it's an interface)
|
protected IClassHierarchy |
cha
Governing class hierarchy for this class
|
protected int |
hashCode
hash code; cached here for efficiency
|
protected Map<Selector,IMethod> |
inheritCache
A mapping from Selector to IMethod used to cache method lookups from superclasses
|
protected IField[] |
instanceFields
The instance fields declared in this class.
|
protected ImmutableByteArray[] |
interfaceNames
The names of interfaces for this class.
|
protected T |
loader
The object that loaded this class.
|
protected Map<Selector,IMethod> |
methodMap
A mapping from Selector to IMethod
TODO: get rid of this for classes (though keep it for interfaces) instead ...
|
protected IField[] |
staticFields
The static fields declared in this class.
|
protected IClass |
superClass
superclass
|
protected boolean |
superclassComputed
Compute the superclass lazily.
|
protected ImmutableByteArray |
superName
An Atom which holds the name of the super class.
|
protected TypeReference |
typeReference
Canonical type representation
|
| Modifier | Constructor and Description |
|---|---|
protected |
BytecodeClass(T loader,
IClassHierarchy cha) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFieldToList(List<FieldImpl> L,
Atom name,
ImmutableByteArray fieldType,
int accessFlags,
Collection<Annotation> annotations,
TypeSignature sig) |
protected Collection<IClass> |
computeAllInterfacesAsCollection() |
protected abstract IMethod[] |
computeDeclaredMethods() |
protected void |
computeMethodMapIfNeeded()
set up the methodMap mapping
|
protected List<IField> |
findDeclaredField(Atom name) |
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.
|
abstract Collection<Annotation> |
getAnnotations(boolean runtimeVisible) |
IClassHierarchy |
getClassHierarchy() |
IClassLoader |
getClassLoader()
Return the object that represents the defining class loader for this class.
|
abstract Module |
getContainer() |
Collection<IField> |
getDeclaredInstanceFields()
Compute the instance fields declared by this class.
|
Collection<IMethod> |
getDeclaredMethods() |
Collection<IField> |
getDeclaredStaticFields() |
Collection<? extends IClass> |
getDirectInterfaces() |
IField |
getField(Atom name)
Finds a field.
|
IField |
getField(Atom name,
TypeName type)
Finds a field, given a name and a type.
|
IMethod |
getMethod(Selector selector)
Finds method matching signature.
|
TypeName |
getName() |
TypeReference |
getReference() |
Reader |
getSource() |
String |
getSourceFileName() |
IClass |
getSuperclass() |
int |
hashCode() |
boolean |
isArrayClass() |
boolean |
isReferenceType()
Does 'this' refer to a reference type? If not, then it refers to a primitive type.
|
protected void |
populateFieldArrayFromList(List<FieldImpl> L,
IField[] A) |
String |
toString() |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitgetAnnotations, getClassInitializer, getModifiers, isAbstract, isInterface, isPrivate, isPublicprotected ImmutableByteArray superName
protected ImmutableByteArray[] interfaceNames
protected final T extends IClassLoader loader
protected final IClassHierarchy cha
protected volatile Map<Selector,IMethod> methodMap
protected Map<Selector,IMethod> inheritCache
protected TypeReference typeReference
protected IClass superClass
protected boolean superclassComputed
protected Collection<IClass> allInterfaces
protected IField[] instanceFields
protected IField[] staticFields
protected int hashCode
protected BytecodeClass(T loader, IClassHierarchy cha)
public abstract Module getContainer()
public IClassLoader getClassLoader()
IClassgetClassLoader in interface IClassprotected abstract IMethod[] computeDeclaredMethods() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileExceptionpublic TypeReference getReference()
getReference in interface IClasspublic String getSourceFileName()
getSourceFileName in interface IClasspublic Reader getSource()
public boolean isArrayClass()
isArrayClass in interface IClasspublic IClassHierarchy getClassHierarchy()
getClassHierarchy in interface IClassHierarchyDwellerpublic TypeName getName()
public boolean isReferenceType()
IClassisReferenceType in interface IClasspublic IField getField(Atom name, TypeName type)
IClassnull if not found.public IClass getSuperclass()
getSuperclass in interface IClasspublic Collection<IField> getAllFields()
IClassgetAllFields in interface IClasspublic Collection<IClass> getAllImplementedInterfaces()
getAllImplementedInterfaces in interface IClasspublic Collection<IField> getDeclaredInstanceFields()
IClassgetDeclaredInstanceFields in interface IClasspublic Collection<IField> getDeclaredStaticFields()
getDeclaredStaticFields in interface IClasspublic Collection<? extends IClass> getDirectInterfaces()
getDirectInterfaces in interface IClasspublic Collection<IField> getAllInstanceFields()
IClassgetAllInstanceFields in interface IClasspublic Collection<IField> getAllStaticFields()
IClassgetAllStaticFields in interface IClasspublic Collection<IMethod> getAllMethods()
IClassgetAllMethods in interface IClasspublic Collection<IMethod> getDeclaredMethods()
getDeclaredMethods in interface IClasspublic IMethod getMethod(Selector selector)
IClassprotected Collection<IClass> computeAllInterfacesAsCollection()
protected void addFieldToList(List<FieldImpl> L, Atom name, ImmutableByteArray fieldType, int accessFlags, Collection<Annotation> annotations, TypeSignature sig)
protected void computeMethodMapIfNeeded()
throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileExceptionpublic abstract Collection<Annotation> getAnnotations(boolean runtimeVisible) throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileExceptionCopyright © 2015. All rights reserved.