|
Web Site | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.janino.IClass
public abstract class IClass
A simplified equivalent to "java.lang.reflect".
Nested Class Summary | |
---|---|
class |
IClass.IConstructor
|
class |
IClass.IField
|
class |
IClass.IInvocable
|
static interface |
IClass.IMember
|
class |
IClass.IMethod
|
Field Summary | |
---|---|
static IClass |
BOOLEAN
|
static IClass |
BYTE
|
static IClass |
CHAR
|
protected IClass.IMethod[] |
declaredIMethods
|
static IClass |
DOUBLE
|
static IClass |
FLOAT
|
static IClass |
INT
|
static IClass |
LONG
|
static IClass.IMethod[] |
NO_IMETHODS
|
static IClass |
SHORT
|
static IClass |
VOID
|
Constructor Summary | |
---|---|
IClass()
|
Method Summary | |
---|---|
protected void |
clearIFieldCaches()
|
abstract Access |
getAccess()
|
IClass |
getArrayIClass(IClass objectType)
Get an IClass that represents an array of this type. |
IClass |
getArrayIClass(int n,
IClass objectType)
Get an IClass that represents an n-dimensional array of this type. |
IClass |
getComponentType()
Returns the component type of the array. Returns "null" for classes, interfaces, primitive types and "void". |
protected abstract IClass |
getComponentType2()
|
IClass[] |
getDeclaredIClasses()
Returns the classes and interfaces declared as members of the class (but not inherited classes and interfaces). Returns an empty array for an array, primitive type or "void". |
protected abstract IClass[] |
getDeclaredIClasses2()
|
IClass.IConstructor[] |
getDeclaredIConstructors()
Returns all the constructors declared by the class represented by the type. |
protected abstract IClass.IConstructor[] |
getDeclaredIConstructors2()
|
IClass.IField |
getDeclaredIField(java.lang.String name)
|
IClass.IField[] |
getDeclaredIFields()
Returns the fields of a class or interface (but not inherited fields). Returns an empty array for an array, primitive type or "void". |
protected abstract IClass.IField[] |
getDeclaredIFields2()
|
IClass.IMethod[] |
getDeclaredIMethods()
Returns the methods of the class or interface (but not inherited methods). Returns an empty array for an array, primitive type or "void". |
IClass.IMethod[] |
getDeclaredIMethods(java.lang.String methodName)
Returns all methods with the given name declared in the class or interface (but not inherited methods). Returns an empty array if no methods with that name are declared. |
protected abstract IClass.IMethod[] |
getDeclaredIMethods2()
|
IClass |
getDeclaringIClass()
If this class is a member class, return the declaring class, otherwise return null . |
protected abstract IClass |
getDeclaringIClass2()
|
java.lang.String |
getDescriptor()
Returns the field descriptor for the type as defined by JVMS 4.3.2. |
protected abstract java.lang.String |
getDescriptor2()
|
static java.lang.String[] |
getDescriptors(IClass[] iClasses)
Convenience method that determines the field descriptors of an array of IClass es. |
IClass.IMethod[] |
getIMethods()
Returns all methods declared in the class or interface, its superclasses and its superinterfaces. For overridden methods, only the last non-abstract implementation is returned. |
IClass[] |
getInterfaces()
Returns the interfaces implemented by the class. Returns the superinterfaces of the interface. Returns "Cloneable" and "Serializable" for arrays. Returns an empty array for primitive types and "void". |
protected abstract IClass[] |
getInterfaces2()
|
IClass |
getOuterIClass()
The following types have an "outer class": Anonymous classes declared in a non-static method of a class Local classes declared in a non-static method of a class Non-static member classes |
protected abstract IClass |
getOuterIClass2()
|
IClass |
getSuperclass()
Returns the superclass of the class. Returns "null" for class "Object", interfaces, arrays, primitive types and "void". |
protected abstract IClass |
getSuperclass2()
|
IClass.IField[] |
getSyntheticIFields()
Returns the synthetic fields of an anonymous or local class, in the order in which they are passed to all constructors. |
boolean |
hasIMethod(java.lang.String methodName,
IClass[] parameterTypes)
|
boolean |
implementsInterface(IClass that)
If this represents a class: Return true if this class
directly or indirectly implements that interface. |
abstract boolean |
isAbstract()
Whether the class may be instantiated (JVMS 4.1 access_flags) |
abstract boolean |
isArray()
Returns "true" if this type represents an array. |
boolean |
isAssignableFrom(IClass that)
Determine if "this" is assignable from "that". |
abstract boolean |
isFinal()
Whether subclassing is allowed (JVMS 4.1 access_flags) |
abstract boolean |
isInterface()
Returns "true" if this type represents an interface. |
abstract boolean |
isPrimitive()
Returns "true" if this type represents a primitive type or "void". |
abstract boolean |
isPrimitiveNumeric()
Returns "true" if this type represents "byte", "short", "int", "long", "char", "float" or "double". |
boolean |
isSubclassOf(IClass that)
Returns true if this class is an immediate or non-immediate
subclass of that class. |
java.lang.String |
toString()
Returns a string representation for this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final IClass VOID
public static final IClass BYTE
public static final IClass CHAR
public static final IClass DOUBLE
public static final IClass FLOAT
public static final IClass INT
public static final IClass LONG
public static final IClass SHORT
public static final IClass BOOLEAN
protected IClass.IMethod[] declaredIMethods
public static final IClass.IMethod[] NO_IMETHODS
Constructor Detail |
---|
public IClass()
Method Detail |
---|
public final IClass.IConstructor[] getDeclaredIConstructors()
Returns an array with zero elements for an interface, array, primitive type or "void".
protected abstract IClass.IConstructor[] getDeclaredIConstructors2()
public final IClass.IMethod[] getDeclaredIMethods()
protected abstract IClass.IMethod[] getDeclaredIMethods2()
public final IClass.IMethod[] getDeclaredIMethods(java.lang.String methodName)
IClass.IMethod
s that must not be modifiedpublic final IClass.IMethod[] getIMethods() throws CompileException
IClass.IMethod
s that must not be modified
CompileException
public final boolean hasIMethod(java.lang.String methodName, IClass[] parameterTypes) throws CompileException
CompileException
public final IClass.IField[] getDeclaredIFields()
public final IClass.IField getDeclaredIField(java.lang.String name)
protected void clearIFieldCaches()
protected abstract IClass.IField[] getDeclaredIFields2()
public IClass.IField[] getSyntheticIFields()
public final IClass[] getDeclaredIClasses() throws CompileException
CompileException
protected abstract IClass[] getDeclaredIClasses2() throws CompileException
CompileException
public final IClass getDeclaringIClass() throws CompileException
null
.
CompileException
protected abstract IClass getDeclaringIClass2() throws CompileException
CompileException
public final IClass getOuterIClass() throws CompileException
CompileException
protected abstract IClass getOuterIClass2() throws CompileException
CompileException
public final IClass getSuperclass() throws CompileException
CompileException
protected abstract IClass getSuperclass2() throws CompileException
CompileException
public abstract Access getAccess()
public abstract boolean isFinal()
true
if subclassing is prohibitedpublic final IClass[] getInterfaces() throws CompileException
CompileException
protected abstract IClass[] getInterfaces2() throws CompileException
CompileException
public abstract boolean isAbstract()
true
if instantiation is prohibitedpublic final java.lang.String getDescriptor()
protected abstract java.lang.String getDescriptor2()
public static java.lang.String[] getDescriptors(IClass[] iClasses)
IClass
es.
getDescriptor()
public abstract boolean isInterface()
public abstract boolean isArray()
public abstract boolean isPrimitive()
public abstract boolean isPrimitiveNumeric()
public final IClass getComponentType()
protected abstract IClass getComponentType2()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isAssignableFrom(IClass that) throws CompileException
CompileException
public boolean isSubclassOf(IClass that) throws CompileException
true
if this class is an immediate or non-immediate
subclass of that
class.
CompileException
public boolean implementsInterface(IClass that) throws CompileException
this
represents a class: Return true
if this class
directly or indirectly implements that
interface.
If this
represents an interface: Return true
if this
interface directly or indirectly extends that
interface.
CompileException
public IClass getArrayIClass(int n, IClass objectType)
IClass
that represents an n-dimensional array of this type.
n
- dimension countobjectType
- Required because the superclass of an array class is Object
by definitionpublic IClass getArrayIClass(IClass objectType)
IClass
that represents an array of this type.
objectType
- Required because the superclass of an array class is Object
by definition
|
Web Site | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |