|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfr.umlv.corosol.component.impl.DefaultJClass
public class DefaultJClass
A DefaultJClass represents a JClass object for an instance class.
| Field Summary |
|---|
| Fields inherited from interface fr.umlv.corosol.component.JClass |
|---|
CATEGORY1, CATEGORY2 |
| Constructor Summary | |
|---|---|
DefaultJClass(JClassLoader loader,
JClassFile classfile)
Creates a new DefaultJClass initialized with the specified class item containing the class datas and the specified class loader. |
|
| 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. |
java.lang.String |
toString()
Returns a string describing this DefaultJClass. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultJClass(JClassLoader loader,
JClassFile classfile)
loader - the class loader of this classclassfile - the class item containing class data| Method Detail |
|---|
public java.lang.Class getNativeClass()
getNativeClass in interface JClassClasspublic boolean isAssignableFrom(JClass c)
isAssignableFrom in interface JClassc - the JClass object to be checked
public boolean isInterface()
isInterface in interface JClasspublic boolean isArray()
isArray in interface JClasspublic boolean isPrimitive()
isPrimitive in interface JClasspublic boolean isAbstract()
isAbstract in interface JClasspublic boolean isAnonymousClass()
isAnonymousClass in interface JClasspublic boolean isJObject()
isJObject in interface JClasspublic java.lang.String getName()
getName in interface JClasspublic JClass getSuperclass()
getSuperclass in interface JClasspublic 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.
getInterfaces in interface JClasspublic JClass getComponentType()
getComponentType in interface JClasspublic 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.
getModifiers in interface JClassModifierpublic JField[] getDeclaredFields()
See The Java Language Specification, sections 8.2 and 8.3.
getDeclaredFields in interface JClass
public JField getDeclaredField(java.lang.String name)
throws java.lang.NoSuchFieldException
getDeclaredField in interface JClassname - the name of the field
java.lang.NoSuchFieldException - if a field with the specified name is
not found.public JMethod[] getDeclaredMethods()
See The Java Language Specification, section 8.2.
getDeclaredMethods in interface JClasspublic JConstructor[] getDeclaredConstructors()
See The Java Language Specification, section 8.2.
getDeclaredConstructors in interface JClasspublic JConstantPool getConstantPool()
getConstantPool in interface JClasspublic JClassLoader getClassLoader()
getClassLoader in interface JClass
public void push(java.lang.Object value,
JStackFrame frame)
push in interface JClassvalue - the value to be pushed onto the operand stack of a frameframe - a stack framepublic JHeapObject pop(JStackFrame frame)
pop in interface JClassframe - a stack frame
public int getComputationalType()
getComputationalType in interface JClassJClass.CATEGORY1,
JClass.CATEGORY2
public void doPutfield(JStackFrame frame,
JField field)
doPutfield in interface JClassframe - the current frame of a threadfield - a JField object describing the field to be setted
public void doGetfield(JStackFrame frame,
JField field)
doGetfield in interface JClassframe - the current stack frame of a threadfield - a JField object describing the field to be pushed
onto the stack frame
public void doPutstatic(JStackFrame frame,
JField field)
doPutstatic in interface JClassframe - the current frame of a threadfield - a JField object describing a field
public void doGetstatic(JStackFrame frame,
JField field)
doGetstatic in interface JClassframe - the current stack frame of a threadfield - a JField object describing a static fieldpublic java.lang.String toString()
toString in class java.lang.Object
public void arrayCopy(JArray src,
int srcPos,
JArray dest,
int destPos,
int length)
arrayCopy in interface JClasssrc - 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.
public void fieldCopy(JField field,
JClassInstance src,
JClassInstance dest)
fieldCopy in interface JClassfield - the field whose the reference value have to be copiedsrc - the source class instancedest - the destination class instance
public void copyValue(JHeap srcHeap,
int src,
JHeap destHeap,
int dest)
copyValue in interface JClass
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||