Package com.ibm.wala.classLoader
Class ShrikeClass
- java.lang.Object
-
- com.ibm.wala.classLoader.BytecodeClass<T>
-
- com.ibm.wala.classLoader.JVMClass<IClassLoader>
-
- com.ibm.wala.classLoader.ShrikeClass
-
- All Implemented Interfaces:
IClass
,IClassHierarchyDweller
public final class ShrikeClass extends JVMClass<IClassLoader>
A class read from Shrike
-
-
Field Summary
-
Fields inherited from class com.ibm.wala.classLoader.BytecodeClass
allInterfaces, cha, hashCode, inheritCache, instanceFields, interfaceNames, loader, methodMap, staticFields, superClass, superclassComputed, superName, typeReference
-
-
Constructor Summary
Constructors Constructor Description ShrikeClass(ShrikeClassReaderHandle reader, IClassLoader loader, IClassHierarchy cha)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearSoftCaches()
Clear all optional cached data associated with this classprotected ShrikeCTMethod[]
computeDeclaredMethods()
initialize the declared methods arrayboolean
equals(Object obj)
Collection<Annotation>
getAnnotations()
get annotations, if anyCollection<Annotation>
getAnnotations(boolean runtimeInvisible)
ClassSignature
getClassSignature()
Module
getContainer()
protected Collection<Annotation>
getFieldAnnotations(int fieldIndex, boolean runtimeInvisible)
ModuleEntry
getModuleEntry()
TypeReference
getOuterClass()
If this is an inner class, return the outer class.ClassReader
getReader()
Collection<Annotation>
getRuntimeInvisibleAnnotations()
Collection<Annotation>
getRuntimeInvisibleAnnotations(int fieldIndex)
read the runtime-invisible annotations from the class fileCollection<Annotation>
getRuntimeVisibleAnnotations()
Collection<Annotation>
getRuntimeVisibleAnnotations(int fieldIndex)
read the runtime-invisible annotations from the class fileboolean
isInnerClass()
Does the class file indicate that this class is a member of some other class?boolean
isStaticInnerClass()
Does the class file indicate that this class is a static inner class?-
Methods inherited from class com.ibm.wala.classLoader.JVMClass
getClassInitializer, getModifiers, isAbstract, isInterface, isPrivate, isPublic
-
Methods inherited from class com.ibm.wala.classLoader.BytecodeClass
addFieldToList, computeAllInterfacesAsCollection, computeMethodMapIfNeeded, findDeclaredField, getAllFields, getAllImplementedInterfaces, getAllInstanceFields, getAllMethods, getAllStaticFields, getClassHierarchy, getClassLoader, getDeclaredInstanceFields, getDeclaredMethods, getDeclaredStaticFields, getDirectInterfaces, getField, getField, getMethod, getName, getReference, getSource, getSourceFileName, getSuperclass, hashCode, isArrayClass, isReferenceType, populateFieldArrayFromList, toString
-
-
-
-
Constructor Detail
-
ShrikeClass
public ShrikeClass(ShrikeClassReaderHandle reader, IClassLoader loader, IClassHierarchy cha) throws InvalidClassFileException
- Throws:
IllegalArgumentException
- if reader is nullInvalidClassFileException
-
-
Method Detail
-
computeDeclaredMethods
protected ShrikeCTMethod[] computeDeclaredMethods() throws InvalidClassFileException
initialize the declared methods array- Specified by:
computeDeclaredMethods
in classBytecodeClass<IClassLoader>
- Throws:
InvalidClassFileException
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObject
- See Also:
Object.equals(Object)
-
getReader
public ClassReader getReader()
-
clearSoftCaches
public void clearSoftCaches()
Clear all optional cached data associated with this class
-
getRuntimeInvisibleAnnotations
public Collection<Annotation> getRuntimeInvisibleAnnotations() throws InvalidClassFileException
- Throws:
InvalidClassFileException
-
getRuntimeVisibleAnnotations
public Collection<Annotation> getRuntimeVisibleAnnotations() throws InvalidClassFileException
- Throws:
InvalidClassFileException
-
getAnnotations
public Collection<Annotation> getAnnotations()
Description copied from interface:IClass
get annotations, if any
-
getAnnotations
public Collection<Annotation> getAnnotations(boolean runtimeInvisible) throws InvalidClassFileException
- Specified by:
getAnnotations
in classBytecodeClass<IClassLoader>
- Throws:
InvalidClassFileException
-
getRuntimeInvisibleAnnotations
public Collection<Annotation> getRuntimeInvisibleAnnotations(int fieldIndex) throws InvalidClassFileException
read the runtime-invisible annotations from the class file- Throws:
InvalidClassFileException
-
getRuntimeVisibleAnnotations
public Collection<Annotation> getRuntimeVisibleAnnotations(int fieldIndex) throws InvalidClassFileException
read the runtime-invisible annotations from the class file- Throws:
InvalidClassFileException
-
getFieldAnnotations
protected Collection<Annotation> getFieldAnnotations(int fieldIndex, boolean runtimeInvisible) throws InvalidClassFileException
- Throws:
InvalidClassFileException
-
getClassSignature
public ClassSignature getClassSignature() throws InvalidClassFileException
- Throws:
InvalidClassFileException
-
getModuleEntry
public ModuleEntry getModuleEntry()
-
isInnerClass
public boolean isInnerClass() throws InvalidClassFileException
Does the class file indicate that this class is a member of some other class?- Throws:
InvalidClassFileException
-
isStaticInnerClass
public boolean isStaticInnerClass() throws InvalidClassFileException
Does the class file indicate that this class is a static inner class?- Throws:
InvalidClassFileException
-
getOuterClass
public TypeReference getOuterClass() throws InvalidClassFileException
If this is an inner class, return the outer class. Else return null.- Throws:
InvalidClassFileException
-
getContainer
public Module getContainer()
- Specified by:
getContainer
in classBytecodeClass<IClassLoader>
-
-