|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface JClass
This interface represents a class object and contains methods which permit to retrieve all informations about a class.
| Field Summary | |
|---|---|
static int |
CATEGORY1
The integer corresponding to a category 1 computational type. |
static int |
CATEGORY2
The integer corresponding to a category 2 computational type. |
| Method Summary | |
|---|---|
void |
arrayCopy(JArray src,
int srcPos,
JArray dest,
int destPos,
int length)
Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array. |
void |
copyValue(JHeap srcHeap,
int src,
JHeap destHeap,
int dest)
|
void |
doGetfield(JStackFrame frame,
JField field)
Does the getfield operations on the specified stack frame. |
void |
doGetstatic(JStackFrame frame,
JField field)
Does the getstatic operations on the specified stack frame. |
void |
doPutfield(JStackFrame frame,
JField field)
Does the putfield operations on the specified stack frame. |
void |
doPutstatic(JStackFrame frame,
JField field)
Does the putstatic operations on the specified stack frame. |
void |
fieldCopy(JField field,
JClassInstance src,
JClassInstance dest)
Copies the reference value of the specified field from the specified source class instance to the specified class instance destination. |
JClassLoader |
getClassLoader()
Returns the class loader of the class represented by this JClass object. |
JClass |
getComponentType()
Returns the JClass representing the component type of an array. |
int |
getComputationalType()
Returns the number representing the computational type category of this class. |
JConstantPool |
getConstantPool()
Returns the constant pool of the class; |
JConstructor[] |
getDeclaredConstructors()
Returns an array of JConstructor objects reflecting all the constructors declared by the class represented by this JClass object. |
JField |
getDeclaredField(java.lang.String name)
Returns a JField object that reflects the specified declared field of the class or interface represented by this JClass object. |
JField[] |
getDeclaredFields()
Returns an array of JField objects reflecting all the fields declared by the class or interface represented by this JClass object. |
JMethod[] |
getDeclaredMethods()
Returns an array of JMethod objects reflecting all the methods declared by the class or interface represented by this JClass object. |
JClass[] |
getInterfaces()
Determines the interfaces implemented by the class or interface represented by this object. |
int |
getModifiers()
Returns the Java language modifiers for this class or interface, encoded in an integer. |
java.lang.String |
getName()
Returns the name of the entity (class, interface, array class, primitive type, or void) represented by this JClass object, as a String. |
java.lang.Class |
getNativeClass()
Returns the java.lang.Class object equivalent to this JClass object. |
JClass |
getSuperclass()
Returns the JClass representing the superclass of the entity (class, interface, primitive type or void) represented by this Class. |
boolean |
isAbstract()
Determines if the specified JClass object represents an abstract type. |
boolean |
isAnonymousClass()
Determines if the specified JClass object represents an anonymous class. |
boolean |
isArray()
Determines if this JClass object represents an array class. |
boolean |
isAssignableFrom(JClass c)
Determines if the class or interface represented by this JClass object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified JClass parameter. |
boolean |
isInterface()
Determines if the specified JClass object represents an interface type. |
boolean |
isJObject()
Determines if the specified JClass object represents a Corosol JObject element. |
boolean |
isPrimitive()
Determines if the specified JClass object represents a primitive type. |
JHeapObject |
pop(JStackFrame frame)
Returns the value located at the top of the operand stack of the specified frame. |
void |
push(java.lang.Object value,
JStackFrame frame)
Pushes the specified value onto the operand stack of the frame frame. |
| Field Detail |
|---|
static final int CATEGORY1
static final int CATEGORY2
| Method Detail |
|---|
boolean isAssignableFrom(JClass c)
c - the JClass object to be checked
boolean isInterface()
boolean isArray()
boolean isPrimitive()
boolean isAbstract()
boolean isAnonymousClass()
boolean isJObject()
java.lang.String getName()
JClass getSuperclass()
JClass[] getInterfaces()
If this object represents a class, the return value is an array containing objects representing all interfaces implemented by the class. The order of the interface objects in the array corresponds to the order of the interface names in the implements clause of the declaration of the class represented by this object.
If this object represents an interface, the array contains objects
representing all interfaces extended by the interface. The order of the
interface objects in the array corresponds to the order of the interface
names in the extends clause of the declaration of the
interface represented by this object.
If this object represents a class or interface that implements no interfaces, the method returns an array of length 0.
If this object represents a primitive type or void, the method returns an array of length 0.
JClass getComponentType()
int getModifiers()
If the underlying class is an array class, then its public, private and protected modifiers are the same as those of its component type. If this Class represents a primitive type or void, its public modifier is always true, and its protected and private modifiers are always false. If this object represents an array class, a primitive type or void, then its final modifier is always true and its interface modifier is always false. The values of its other modifiers are not determined by this specification.
The modifier encodings are defined in The Java Virtual Machine Specification, table 4.1.
ModifierJField[] getDeclaredFields()
See The Java Language Specification, sections 8.2 and 8.3.
JField getDeclaredField(java.lang.String name)
throws java.lang.NoSuchFieldException
name - the name of the field
java.lang.NoSuchFieldException - if a field with the specified name is
not found.JMethod[] getDeclaredMethods()
See The Java Language Specification, section 8.2.
JConstructor[] getDeclaredConstructors()
See The Java Language Specification, section 8.2.
JConstantPool getConstantPool()
JClassLoader getClassLoader()
void push(java.lang.Object value,
JStackFrame frame)
value - the value to be pushed onto the operand stack of a frameframe - a stack frameJHeapObject pop(JStackFrame frame)
frame - a stack frame
int getComputationalType()
CATEGORY1,
CATEGORY2
void doPutfield(JStackFrame frame,
JField field)
frame - the current frame of a threadfield - a JField object describing the field to be setted
void doGetfield(JStackFrame frame,
JField field)
frame - the current stack frame of a threadfield - a JField object describing the field to be pushed
onto the stack frame
void doPutstatic(JStackFrame frame,
JField field)
frame - the current frame of a threadfield - a JField object describing a field
void doGetstatic(JStackFrame frame,
JField field)
frame - the current stack frame of a threadfield - a JField object describing a static field
void arrayCopy(JArray src,
int srcPos,
JArray dest,
int destPos,
int length)
src - the source array.srcPos - starting position in the source array.dest - the destination array.destPos - starting position in the destination data.length - the number of array elements to be copied.
void fieldCopy(JField field,
JClassInstance src,
JClassInstance dest)
field - the reference field whose the value have to be copiedsrc - the source class instancedest - the destination class instancejava.lang.Class getNativeClass()
Class
void copyValue(JHeap srcHeap,
int src,
JHeap destHeap,
int dest)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||