Package org.codehaus.janino
Class ReflectionIClass
java.lang.Object
org.codehaus.janino.IClass
org.codehaus.janino.ReflectionIClass
- All Implemented Interfaces:
IType
,ITypeVariableOrIClass
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
private class
class
Nested classes/interfaces inherited from class org.codehaus.janino.IClass
IClass.IAnnotation, IClass.IConstructor, IClass.IField, IClass.IInvocable, IClass.IMember, IClass.IMethod
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate IClass[]
classesToIClasses
(Class<?>[] cs) private IClass
classToIClass
(Class<?> c) private IClass.IField[]
fieldsToIFields
(Field[] fields) Class<?>
getClazz()
protected IClass
protected IClass[]
protected IClass.IConstructor[]
The uncached version ofIClass.getDeclaredIConstructors()
which must be implemented by derived classes.protected IClass.IField[]
Uncached version ofIClass.getDeclaredIFields()
.protected IClass.IMethod[]
The uncached version ofIClass.getDeclaredIMethods()
which must be implemented by derived classes.protected IClass
protected String
protected IClass[]
The uncached version ofIClass.getDeclaredIConstructors()
which must be implemented by derived classes.protected IClass
protected IClass
boolean
Whether the class may be instantiated (JVMS 4.1 access_flags).boolean
isArray()
boolean
isEnum()
boolean
isFinal()
Whether subclassing is allowed (JVMS 4.1 access_flags)boolean
boolean
boolean
private IClass.IMethod[]
methodsToIMethods
(Method[] methods) private static Access
modifiers2Access
(int modifiers) toString()
private IType[]
typesToITypes
(Type[] types) private IType
typeToIType
(Type type) private ITypeVariable
Methods inherited from class org.codehaus.janino.IClass
clearIFieldCaches, findIConstructor, findIMethod, findMemberType, getArrayIClass, getArrayIClass, getComponentType, getDeclaredIClasses, getDeclaredIConstructors, getDeclaredIField, getDeclaredIFields, getDeclaredIMethods, getDeclaredIMethods, getDeclaringIClass, getDescriptor, getDescriptors, getIAnnotations, getIMethods, getInterfaces, getITypeVariables, getOuterIClass, getSuperclass, getSyntheticIFields, hasIMethod, implementsInterface, invalidateMethodCaches, isAssignableFrom, isSubclassOf, rawTypeOf
-
Field Details
-
clazz
-
iClassLoader
-
-
Constructor Details
-
ReflectionIClass
ReflectionIClass(Class<?> clazz, IClassLoader iClassLoader) - Parameters:
iClassLoader
- Required to load otherIClass
es onget...()
-
-
Method Details
-
getITypeVariables2
Description copied from class:IClass
The uncached version ofIClass.getDeclaredIConstructors()
which must be implemented by derived classes.- Specified by:
getITypeVariables2
in classIClass
-
typeVariableToITypeVariable
-
typesToITypes
- Throws:
CompileException
-
typeToIType
- Throws:
CompileException
-
getDeclaredIConstructors2
Description copied from class:IClass
The uncached version ofIClass.getDeclaredIConstructors()
which must be implemented by derived classes.- Specified by:
getDeclaredIConstructors2
in classIClass
-
getDeclaredIMethods2
Description copied from class:IClass
The uncached version ofIClass.getDeclaredIMethods()
which must be implemented by derived classes.- Specified by:
getDeclaredIMethods2
in classIClass
-
getDeclaredIFields2
Description copied from class:IClass
Uncached version ofIClass.getDeclaredIFields()
.- Specified by:
getDeclaredIFields2
in classIClass
-
getDeclaredIClasses2
- Specified by:
getDeclaredIClasses2
in classIClass
- Returns:
- The member types of this type
-
getDeclaringIClass2
- Specified by:
getDeclaringIClass2
in classIClass
- Returns:
- If this class is a member class, the declaring class, otherwise
null
-
getOuterIClass2
- Specified by:
getOuterIClass2
in classIClass
- Throws:
CompileException
- See Also:
-
getSuperclass2
- Specified by:
getSuperclass2
in classIClass
- See Also:
-
getComponentType2
- Specified by:
getComponentType2
in classIClass
- See Also:
-
getInterfaces2
- Specified by:
getInterfaces2
in classIClass
- See Also:
-
getDescriptor2
- Specified by:
getDescriptor2
in classIClass
- Returns:
- The field descriptor for the type as defined by JVMS 4.3.2.
-
getAccess
-
isFinal
public boolean isFinal()Description copied from class:IClass
Whether subclassing is allowed (JVMS 4.1 access_flags) -
isEnum
public boolean isEnum() -
isInterface
public boolean isInterface()- Specified by:
isInterface
in classIClass
- Returns:
- Whether this type represents an interface
-
isAbstract
public boolean isAbstract()Description copied from class:IClass
Whether the class may be instantiated (JVMS 4.1 access_flags).- Specified by:
isAbstract
in classIClass
- Returns:
true
if instantiation is prohibited
-
isArray
public boolean isArray() -
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitive
in classIClass
- Returns:
- Whether this type represents a primitive type or
void
-
isPrimitiveNumeric
public boolean isPrimitiveNumeric()- Specified by:
isPrimitiveNumeric
in classIClass
- Returns:
- Whether this type represents
byte
,short
,int
,long
,char
,float
ordouble
-
getIAnnotations2
- Overrides:
getIAnnotations2
in classIClass
- Throws:
CompileException
-
getClazz
- Returns:
- The underlying
java.lang.Class
-
toString
-
classToIClass
-
classesToIClasses
- See Also:
-
methodsToIMethods
-
fieldsToIFields
-
modifiers2Access
-