fr.umlv.corosol.component.impl
Class CharClass

java.lang.Object
  extended by fr.umlv.corosol.component.JPrimitiveClass
      extended by fr.umlv.corosol.component.impl.CharClass
All Implemented Interfaces:
JClass, JObject

public class CharClass
extends JPrimitiveClass

This class is the default implementation of the char.class.

Author:
Christophe Deleray

Field Summary
 
Fields inherited from class fr.umlv.corosol.component.JPrimitiveClass
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, SHORT, VOID
 
Fields inherited from interface fr.umlv.corosol.component.JClass
CATEGORY1, CATEGORY2
 
Constructor Summary
CharClass()
          Creates a new CharClass object.
 
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 char value of the specified field from the specified source class instance to the specified class instance destination.
 int getComputationalType()
          Returns the number representing the computational type category of this class.
 java.lang.Class getNativeClass()
          Returns the java.lang.Class object equivalent to this JClass object.
 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 representation of this class.
 
Methods inherited from class fr.umlv.corosol.component.JPrimitiveClass
getClassLoader, getComponentType, getConstantPool, getDeclaredConstructors, getDeclaredField, getDeclaredFields, getDeclaredMethods, getInterfaces, getModifiers, getName, getSuperclass, isAbstract, isAnonymousClass, isArray, isAssignableFrom, isInterface, isJObject, isPrimitive
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharClass

public CharClass()
Creates a new CharClass object.

Method Detail

getNativeClass

public java.lang.Class getNativeClass()
Returns the java.lang.Class object equivalent to this JClass object.

Returns:
the java.lang.Class object equivalent to this JClass object
See Also:
Class

push

public void push(java.lang.Object value,
                 JStackFrame frame)
Pushes the specified value onto the operand stack of the frame frame.

Parameters:
value - the value to be pushed onto the operand stack of a frame
frame - a stack frame

pop

public JHeapObject pop(JStackFrame frame)
Returns the value located at the top of the operand stack of the specified frame.

Parameters:
frame - a stack frame
Returns:
the value located at the top of the operand stack of the specified stack frame

getComputationalType

public int getComputationalType()
Returns the number representing the computational type category of this class.

Returns:
a value representing the computational type category
See Also:
JClass.CATEGORY1, JClass.CATEGORY2

doPutfield

public void doPutfield(JStackFrame frame,
                       JField field)
Does the putfield operations on the specified stack frame. This operation pop a value and an object reference. Then, it sets the specified field of the object with the popped value.

Parameters:
frame - the current frame of a thread
field - a JField object describing a field

doGetfield

public void doGetfield(JStackFrame frame,
                       JField field)
Does the getfield operations on the specified stack frame. This operation pop an object reference. Then, it sets the specified field of the object with the popped value.

Parameters:
frame - the current stack frame of a thread
field - a JField object describing the field to be pushed onto the stack frame

doPutstatic

public void doPutstatic(JStackFrame frame,
                        JField field)
Does the putstatic operations on the specified stack frame. This operation pop a value from the current stack frame. Then, it sets the specified static field with the popped value.

Parameters:
frame - the current frame of a thread
field - a JField object describing a static field

doGetstatic

public void doGetstatic(JStackFrame frame,
                        JField field)
Does the getstatic operations on the specified stack frame. This operation push onto the current stack frame the value of the specified static field.

Parameters:
frame - the current stack frame of a thread
field - a JField object describing a static field

arrayCopy

public 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. A subsequence of array components are copied from the source array referenced by src to the destination array referenced by dest. The number of components copied is equal to the length argument. The components at positions srcPos through srcPos+length-1 in the source array are copied into positions destPos through destPos+length-1, respectively, of the destination array.

Parameters:
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.

fieldCopy

public void fieldCopy(JField field,
                      JClassInstance src,
                      JClassInstance dest)
Copies the char value of the specified field from the specified source class instance to the specified class instance destination.

Parameters:
field - the char field whose the value have to be copied
src - the source class instance
dest - the destination class instance

toString

public java.lang.String toString()
Returns a String representation of this class.

Overrides:
toString in class java.lang.Object

copyValue

public void copyValue(JHeap srcHeap,
                      int src,
                      JHeap destHeap,
                      int dest)