|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.janino.IClass
A simplified equivalent to "java.lang.reflect".
Inner Class Summary | |
class |
IClass.IConstructor
|
class |
IClass.IField
|
class |
IClass.IInvocable
|
class |
IClass.IMember
|
class |
IClass.IMethod
|
Field Summary | |
static int |
PACKAGE
Return value for IClass.IMember.getAccess() . |
static int |
PRIVATE
Return value for IClass.IMember.getAccess() . |
static int |
PROTECTED
Return value for IClass.IMember.getAccess() . |
static int |
PUBLIC
Return value for IClass.IMember.getAccess() . |
Constructor Summary | |
IClass()
|
Method Summary | |
static IClass |
createArrayIClass(IClass componentType,
IClass objectType)
Create an IClass that represents an array of the given component type. |
abstract IClass |
getComponentType()
Returns the component type of the array. Returns "null" for classes, interfaces, primitive types and "void". |
abstract 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". |
abstract IClass.IConstructor[] |
getDeclaredIConstructors()
Returns all the constructors declared by the class represented by the type. |
abstract 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". |
abstract 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". |
abstract java.lang.String |
getDescriptor()
Returns the field descriptor for the type as defined by JVMS 4.3.2. |
abstract 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". |
abstract IClass |
getSuperclass()
Returns the superclass of the class. Returns "null" for class "Object", interfaces, arrays, primitive types and "void". |
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". |
abstract boolean |
isPublic()
Whether the class may be accessed from outside its package (JVMS 4.1 access_flags) |
boolean |
isSubclassOf(IClass that)
Returns true if this class is an immediate or non-immediate
subclass of that class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PRIVATE
IClass.IMember.getAccess()
.public static final int PROTECTED
IClass.IMember.getAccess()
.public static final int PACKAGE
IClass.IMember.getAccess()
.public static final int PUBLIC
IClass.IMember.getAccess()
.Constructor Detail |
public IClass()
Method Detail |
public abstract IClass.IConstructor[] getDeclaredIConstructors()
public abstract IClass.IMethod[] getDeclaredIMethods()
public abstract IClass.IField[] getDeclaredIFields()
public abstract IClass[] getDeclaredIClasses()
public abstract IClass getSuperclass() throws Java.CompileException
public abstract boolean isPublic()
public abstract boolean isFinal()
true
if subclassing is prohibitedpublic abstract IClass[] getInterfaces() throws Java.CompileException
public abstract boolean isAbstract()
true
if instantiation is prohibitedpublic abstract java.lang.String getDescriptor()
public abstract boolean isInterface()
public abstract boolean isArray()
public abstract boolean isPrimitive()
public abstract boolean isPrimitiveNumeric()
public abstract IClass getComponentType()
public boolean isAssignableFrom(IClass that) throws Java.CompileException
public boolean isSubclassOf(IClass that) throws Java.CompileException
true
if this class is an immediate or non-immediate
subclass of that
class.public boolean implementsInterface(IClass that) throws Java.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.
public static IClass createArrayIClass(IClass componentType, IClass objectType)
IClass
that represents an array of the given component type.componentType
- objectType
- Required because the superclass of an array class is java.lang.Object
by definition
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |