Top Description Fields Constructors Methods
org.codehaus.janino

public Class ClassFileIClass

extends IClass
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .List, .Map, .Map.Entry, java.util.logging.Logger, org.codehaus.commons.compiler.CompileException, .InternalCompilerException, org.codehaus.commons.nullanalysis.Nullable, org.codehaus.janino.util.ClassFile, .ClassFile.Annotation, .ClassFile.ArrayElementValue, .ClassFile.BooleanElementValue, .ClassFile.ByteElementValue, .ClassFile.CharElementValue, .ClassFile.ClassElementValue, .ClassFile.ConstantClassInfo, .ClassFile.DoubleElementValue, .ClassFile.EnumConstValue, .ClassFile.FloatElementValue, .ClassFile.IntElementValue, .ClassFile.LongElementValue, .ClassFile.ShortElementValue, .ClassFile.SignatureAttribute, .ClassFile.StringElementValue, org.codehaus.janino.util.signature.SignatureParser, .SignatureParser.ArrayTypeSignature, .SignatureParser.ClassSignature, .SignatureParser.ClassTypeSignature, .SignatureParser.FieldTypeSignature, .SignatureParser.FieldTypeSignatureVisitor, .SignatureParser.FormalTypeParameter, .SignatureParser.SignatureException, .SignatureParser.TypeVariableSignature

A wrapper object that turns a ClassFile object into an IClass.

Field Summary

Modifier and TypeField and Description
private final short
private final ClassFile
private final SignatureParser.ClassSignature
private final IClassLoader
private static final Logger
private final Map<String, IClass>
private final Map<ClassFile.FieldInfo, IClass.IField>
private final Map<ClassFile.MethodInfo, IClass.IInvocable>
Inherited from org.codehaus.janino.IClass:
BOOLEANBYTECHARDOUBLEFLOATINTLONGNO_ANNOTATIONSNOT_CONSTANTNULLSHORTVOID

Constructor Summary

AccessConstructor and Description
public
ClassFileIClass(ClassFile
Source of data
classFile
,
IClassLoader
IClassLoader through which to load other classes
iClassLoader
)

Method Summary

Modifier and TypeMethod and Description
private static Access
accessFlags2Access(short accessFlags)

private ITypeVariableOrIClass
public Access
private ITypeVariableOrIClass[]
protected IClass
protected IClass[]
protected IClass.IConstructor[]
getDeclaredIConstructors2()

Implements abstract org.codehaus.janino.IClass.getDeclaredIConstructors2.

The uncached version of getDeclaredIConstructors() which must be implemented by derived classes.
protected IClass.IField[]
protected IClass.IMethod[]
getDeclaredIMethods2()

Implements abstract org.codehaus.janino.IClass.getDeclaredIMethods2.

The uncached version of getDeclaredIMethods() which must be implemented by derived classes.
protected IClass
protected String
protected IClass.IAnnotation[]
protected IClass[]
protected ITypeVariable[]
getITypeVariables2()

Implements abstract org.codehaus.janino.IClass.getITypeVariables2.

The uncached version of getDeclaredIConstructors() which must be implemented by derived classes.
protected IClass
protected IClass
public boolean
isAbstract()

Implements abstract org.codehaus.janino.IClass.isAbstract.

Whether the class may be instantiated (JVMS 4.1 access_flags).
public boolean
public boolean
public boolean
isFinal()

Implements abstract org.codehaus.janino.IClass.isFinal.

Whether subclassing is allowed (JVMS 4.1 access_flags)
public boolean
public boolean
public boolean
public void
resolveAllClasses()

Resolves all classes referenced by this class file.

private IClass
resolveClass(short
Index of the CONSTANT_Class_info to resolve (JVMS 4.4.1)
index
)

private IClass
resolveClass(String descriptor)

private IClass[]
resolveClasses(short[] ifs)

private IClass.IField
resolveField(final ClassFile.FieldInfo fieldInfo)

private IClass.IInvocable
private IClass.IAnnotation
private IClass.IAnnotation[]
Inherited from org.codehaus.janino.IClass:
clearIFieldCachesfindIConstructorfindIMethodfindMemberTypegetComponentTypegetDeclaredIClassesgetDeclaredIConstructorsgetDeclaredIFieldgetDeclaredIFieldsgetDeclaredIMethodsgetDeclaredIMethodsgetDeclaringIClassgetDescriptorgetDescriptorsgetIAnnotationsgetIMethodsgetInterfacesgetITypeVariablesgetOuterIClassgetSuperclassgetSyntheticIFieldshasIMethodimplementsInterfaceinvalidateMethodCachesisAssignableFromisSubclassOfrawTypeOftoString

Field Detail

accessFlagsback to summary
private final short accessFlags
classFileback to summary
private final ClassFile classFile
classSignatureback to summary
private final SignatureParser.ClassSignature classSignature
Annotations
@Nullable
iClassLoaderback to summary
private final IClassLoader iClassLoader
LOGGERback to summary
private static final Logger LOGGER

Hides org.codehaus.janino.IClass.LOGGER.

resolvedClassesback to summary
private final Map<String, IClass> resolvedClasses
resolvedFieldsback to summary
private final Map<ClassFile.FieldInfo, IClass.IField> resolvedFields
resolvedMethodsback to summary
private final Map<ClassFile.MethodInfo, IClass.IInvocable> resolvedMethods

Constructor Detail

ClassFileIClassback to summary
public ClassFileIClass(ClassFile classFile, IClassLoader iClassLoader)
Parameters
classFile:ClassFile

Source of data

iClassLoader:IClassLoader

IClassLoader through which to load other classes

Method Detail

accessFlags2Accessback to summary
private static Access accessFlags2Access(short accessFlags)
fieldTypeSignatureToITypeVariableOrIClassback to summary
private ITypeVariableOrIClass fieldTypeSignatureToITypeVariableOrIClass(SignatureParser.FieldTypeSignature fts) throws CompileException
getAccessback to summary
public Access getAccess()

Implements abstract org.codehaus.janino.IClass.getAccess.

Returns:Access

Doc from org.codehaus.janino.IClass.getAccess.

The accessibility of this type

Annotations
@Override
getBoundsback to summary
private ITypeVariableOrIClass[] getBounds(SignatureParser.FormalTypeParameter ftp) throws CompileException
getComponentType2back to summary
protected IClass getComponentType2()

Implements abstract org.codehaus.janino.IClass.getComponentType2.

Annotations
@Override
@Nullable
getDeclaredIClasses2back to summary
protected IClass[] getDeclaredIClasses2() throws CompileException

Implements abstract org.codehaus.janino.IClass.getDeclaredIClasses2.

Returns:IClass[]

Doc from org.codehaus.janino.IClass.getDeclaredIClasses2.

The member types of this type

Annotations
@Override
getDeclaredIConstructors2back to summary
protected IClass.IConstructor[] getDeclaredIConstructors2()

Implements abstract org.codehaus.janino.IClass.getDeclaredIConstructors2.

Doc from org.codehaus.janino.IClass.getDeclaredIConstructors2.

The uncached version of getDeclaredIConstructors() which must be implemented by derived classes.

Annotations
@Override
getDeclaredIFields2back to summary
protected IClass.IField[] getDeclaredIFields2()

Implements abstract org.codehaus.janino.IClass.getDeclaredIFields2.

Doc from org.codehaus.janino.IClass.getDeclaredIFields2.

Uncached version of getDeclaredIFields().

Annotations
@Override
getDeclaredIMethods2back to summary
protected IClass.IMethod[] getDeclaredIMethods2()

Implements abstract org.codehaus.janino.IClass.getDeclaredIMethods2.

Doc from org.codehaus.janino.IClass.getDeclaredIMethods2.

The uncached version of getDeclaredIMethods() which must be implemented by derived classes.

Annotations
@Override
getDeclaringIClass2back to summary
protected IClass getDeclaringIClass2() throws CompileException

Implements abstract org.codehaus.janino.IClass.getDeclaringIClass2.

Returns:IClass

Doc from org.codehaus.janino.IClass.getDeclaringIClass2.

If this class is a member class, the declaring class, otherwise null

Annotations
@Override
@Nullable
getDescriptor2back to summary
protected String getDescriptor2()

Implements abstract org.codehaus.janino.IClass.getDescriptor2.

Returns:String

Doc from org.codehaus.janino.IClass.getDescriptor2.

The field descriptor for the type as defined by JVMS 4.3.2.

Annotations
@Override
getIAnnotations2back to summary
protected IClass.IAnnotation[] getIAnnotations2() throws CompileException

Overrides org.codehaus.janino.IClass.getIAnnotations2.

Annotations
@Override
getInterfaces2back to summary
protected IClass[] getInterfaces2() throws CompileException

Implements abstract org.codehaus.janino.IClass.getInterfaces2.

Annotations
@Override
getITypeVariables2back to summary
protected ITypeVariable[] getITypeVariables2() throws CompileException

Implements abstract org.codehaus.janino.IClass.getITypeVariables2.

Doc from org.codehaus.janino.IClass.getITypeVariables2.

The uncached version of getDeclaredIConstructors() which must be implemented by derived classes.

Annotations
@Override
getOuterIClass2back to summary
protected IClass getOuterIClass2() throws CompileException

Implements abstract org.codehaus.janino.IClass.getOuterIClass2.

Annotations
@Override
@Nullable
getSuperclass2back to summary
protected IClass getSuperclass2() throws CompileException

Implements abstract org.codehaus.janino.IClass.getSuperclass2.

Annotations
@Override
@Nullable
isAbstractback to summary
public boolean isAbstract()

Implements abstract org.codehaus.janino.IClass.isAbstract.

Doc from org.codehaus.janino.IClass.isAbstract.

Whether the class may be instantiated (JVMS 4.1 access_flags).

Returns:boolean

true if instantiation is prohibited

Annotations
@Override
isArrayback to summary
public boolean isArray()

Implements abstract org.codehaus.janino.IClass.isArray.

Returns:boolean

Doc from org.codehaus.janino.IClass.isArray.

Whether this type represents an array

Annotations
@Override
isEnumback to summary
public boolean isEnum()

Implements abstract org.codehaus.janino.IClass.isEnum.

Returns:boolean

Doc from org.codehaus.janino.IClass.isEnum.

Whether this type represents an enum

Annotations
@Override
isFinalback to summary
public boolean isFinal()

Implements abstract org.codehaus.janino.IClass.isFinal.

Doc from org.codehaus.janino.IClass.isFinal.

Whether subclassing is allowed (JVMS 4.1 access_flags)

Returns:boolean

true if subclassing is prohibited

Annotations
@Override
isInterfaceback to summary
public boolean isInterface()

Implements abstract org.codehaus.janino.IClass.isInterface.

Returns:boolean

Doc from org.codehaus.janino.IClass.isInterface.

Whether this type represents an interface

Annotations
@Override
isPrimitiveback to summary
public boolean isPrimitive()

Implements abstract org.codehaus.janino.IClass.isPrimitive.

Returns:boolean

Doc from org.codehaus.janino.IClass.isPrimitive.

Whether this type represents a primitive type or void

Annotations
@Override
isPrimitiveNumericback to summary
public boolean isPrimitiveNumeric()

Implements abstract org.codehaus.janino.IClass.isPrimitiveNumeric.

Returns:boolean

Doc from org.codehaus.janino.IClass.isPrimitiveNumeric.

Whether this type represents byte, short, int, long, char, float or double

Annotations
@Override
resolveAllClassesback to summary
public void resolveAllClasses() throws ClassNotFoundException

Resolves all classes referenced by this class file.

resolveClassback to summary
private IClass resolveClass(short index) throws ClassNotFoundException
Parameters
index:short

Index of the CONSTANT_Class_info to resolve (JVMS 4.4.1)

resolveClassback to summary
private IClass resolveClass(String descriptor) throws ClassNotFoundException
resolveClassesback to summary
private IClass[] resolveClasses(short[] ifs) throws CompileException
resolveFieldback to summary
private IClass.IField resolveField(final ClassFile.FieldInfo fieldInfo) throws ClassNotFoundException
resolveMethodback to summary
private IClass.IInvocable resolveMethod(final ClassFile.MethodInfo methodInfo) throws ClassNotFoundException

Turns a ClassFile.MethodInfo into an IInvocable. This includes the checking and the removal of the magic first parameter of an inner class constructor.

toIAnnotationback to summary
private IClass.IAnnotation toIAnnotation(final ClassFile.Annotation annotation) throws CompileException
toIAnnotationsback to summary
private IClass.IAnnotation[] toIAnnotations(ClassFile.Annotation[] annotations) throws CompileException