Class ShrikeClass
- All Implemented Interfaces:
IClass, IClassHierarchyDweller
A class read from Shrike
-
Field Summary
Fields inherited from class JVMClass
modifiersModifier and TypeFieldDescriptionprotected intJVM-level modifiers; cached here for efficiencyFields inherited from class BytecodeClass
allInterfaces, cha, hashCode, inheritCache, instanceFields, interfaceNames, loader, methodMap, staticFields, superClass, superclassComputed, superName, typeReferenceModifier and TypeFieldDescriptionprotected Collection<IClass> The IClasses that represent all interfaces this class implements (if it's a class) or extends (it it's an interface)protected final IClassHierarchyGoverning class hierarchy for this classprotected inthash code; cached here for efficiencyA mapping from Selector to IMethod used to cache method lookups from superclassesprotected IField[]The instance fields declared in this class.protected ImmutableByteArray[]The names of interfaces for this class.protected final IClassLoaderThe object that loaded this class.A mapping from Selector to IMethodprotected IField[]The static fields declared in this class.protected IClasssuperclassprotected booleanCompute the superclass lazily.protected ImmutableByteArrayAn Atom which holds the name of the super class.protected TypeReferenceCanonical type representation -
Constructor Summary
ConstructorsConstructorDescriptionShrikeClass(ShrikeClassReaderHandle reader, IClassLoader loader, IClassHierarchy cha) -
Method Summary
Modifier and TypeMethodDescriptionvoidClear all optional cached data associated with this classprotected ShrikeCTMethod[]initialize the declared methods arraybooleanget annotations, if anygetAnnotations(boolean runtimeInvisible) If this is an inner class, return the outer class.getRuntimeInvisibleAnnotations(int fieldIndex) read the runtime-invisible annotations from the class filegetRuntimeInvisibleTypeAnnotations(int fieldIndex) read the runtime-invisible type annotations from the class filegetRuntimeVisibleAnnotations(int fieldIndex) read the runtime-invisible annotations from the class filegetRuntimeVisibleTypeAnnotations(int fieldIndex) read the runtime-visible type annotations from the class filegetTypeAnnotations(boolean runtimeInvisible) booleanDoes the class file indicate that this class is a member of some other class?booleanDoes the class file indicate that this class is a static inner class?Methods inherited from class JVMClass
getClassInitializer, getModifiers, isAbstract, isInterface, isPrivate, isPublic, isSyntheticModifier and TypeMethodDescriptionintReturn the integer that encodes the class's modifiers, as defined by the JVM specificationbooleanbooleanIs this class a Java interface?booleanbooleanisPublic()booleanMethods inherited from class BytecodeClass
addFieldToList, computeAllInterfacesAsCollection, computeMethodMapIfNeeded, findDeclaredField, getAllFields, getAllImplementedInterfaces, getAllInstanceFields, getAllMethods, getAllStaticFields, getClassHierarchy, getClassLoader, getDeclaredInstanceFields, getDeclaredMethods, getDeclaredStaticFields, getDirectInterfaces, getField, getField, getMethod, getName, getReference, getSource, getSourceFileName, getSuperclass, getSuperName, hashCode, isArrayClass, isReferenceType, toStringModifier and TypeMethodDescriptionprotected voidaddFieldToList(List<FieldImpl> L, Atom name, ImmutableByteArray fieldType, int accessFlags, Collection<Annotation> annotations, Collection<TypeAnnotation> typeAnnotations, TypeSignature sig) protected Collection<IClass> protected voidset up the methodMap mappingfindDeclaredField(Atom name) Compute 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.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.Return the object that represents the defining class loader for this class.Compute the instance fields declared by this class.Collection<? extends IClass> Finds a field.Finds a field, given a name and a type.Finds method matching signature.getName()inthashCode()booleanbooleanDoes 'this' refer to a reference type? If not, then it refers to a primitive type.toString()
-
Constructor Details
-
ShrikeClass
public ShrikeClass(ShrikeClassReaderHandle reader, IClassLoader loader, IClassHierarchy cha) throws InvalidClassFileException - Throws:
IllegalArgumentException- if reader is nullInvalidClassFileException
-
-
Method Details
-
computeDeclaredMethods
initialize the declared methods array- Specified by:
computeDeclaredMethodsin classBytecodeClass<IClassLoader>- Throws:
InvalidClassFileException
-
equals
-
getReader
-
clearSoftCaches
public void clearSoftCaches()Clear all optional cached data associated with this class -
getRuntimeInvisibleAnnotations
- Throws:
InvalidClassFileException
-
getRuntimeVisibleAnnotations
- Throws:
InvalidClassFileException
-
getAnnotations
Description copied from interface:IClassget annotations, if any -
getAnnotations
public Collection<Annotation> getAnnotations(boolean runtimeInvisible) throws InvalidClassFileException - Specified by:
getAnnotationsin classBytecodeClass<IClassLoader>- Throws:
InvalidClassFileException
-
getTypeAnnotations
public Collection<TypeAnnotation> getTypeAnnotations(boolean runtimeInvisible) throws InvalidClassFileException - 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
-
getRuntimeInvisibleTypeAnnotations
public Collection<TypeAnnotation> getRuntimeInvisibleTypeAnnotations(int fieldIndex) throws InvalidClassFileException read the runtime-invisible type annotations from the class file- Throws:
InvalidClassFileException
-
getRuntimeVisibleTypeAnnotations
public Collection<TypeAnnotation> getRuntimeVisibleTypeAnnotations(int fieldIndex) throws InvalidClassFileException read the runtime-visible type annotations from the class file- Throws:
InvalidClassFileException
-
getClassSignature
- Throws:
InvalidClassFileException
-
getModuleEntry
-
isInnerClass
Does the class file indicate that this class is a member of some other class?- Throws:
InvalidClassFileException
-
isStaticInnerClass
Does the class file indicate that this class is a static inner class?- Throws:
InvalidClassFileException
-
getOuterClass
If this is an inner class, return the outer class. Else return null.- Throws:
InvalidClassFileException
-
getContainer
- Specified by:
getContainerin classBytecodeClass<IClassLoader>
-