com.jniwrapper
Class Char

java.lang.Object
  extended by com.jniwrapper.Parameter
      extended by com.jniwrapper.Char

public class Char
extends Parameter

Represents the char value and type.


Field Summary
 
Fields inherited from class com.jniwrapper.Parameter
LICENSE_TYPE, V
 
Constructor Summary
Char()
          Constructs a character with \0 value.
Char(char c)
          Constructs a character with a specified value.
Char(Char t)
          Constructs a copy of the Char object.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
          Compares this Parameter object to a given object.
 java.lang.String getDebugInfo()
          Return debug info for JNIWrapper parameter.
 int getLength()
          Returns the length of the parameter in memory.
 char getValue()
          Returns a character value.
 int hashCode()
           
 void pop(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Default implementation that does nothing because most primitive types do nothing on pop.
 void push(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Writes a parameter to a function stacks.
 void read(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Reads this parameter from a specified data source.
 void setValue(char value)
          Sets a character value.
 Char toChar()
           
 java.lang.String toString()
           
 void write(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Writes this parameter to a specified data source.
 
Methods inherited from class com.jniwrapper.Parameter
acceptIOPerformer, asReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, read, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Char

public Char()
Constructs a character with \0 value.


Char

public Char(char c)
Constructs a character with a specified value.


Char

public Char(Char t)
Constructs a copy of the Char object.

Method Detail

getValue

public char getValue()
Returns a character value.


setValue

public void setValue(char value)
Sets a character value.

Throws:
java.lang.IllegalArgumentException - if character is not within 0..255 range.
See Also:
WideChar

getLength

public int getLength()
Description copied from class: Parameter
Returns the length of the parameter in memory. This method is similar to C sizeof() operator.

Specified by:
getLength in class Parameter

clone

public java.lang.Object clone()
Specified by:
clone in class Parameter

toChar

public Char toChar()

equals

public boolean equals(java.lang.Object obj)
Description copied from class: Parameter
Compares this Parameter object to a given object. Two Parameter objects are considered equal if their byte representations are equal and they are of the same type. Subclasses may override this method as appropriate.

Overrides:
equals in class Parameter
Parameters:
obj - a value to compare this object to.
Returns:
true if two objects are equal.

hashCode

public int hashCode()
Overrides:
hashCode in class Parameter

write

public void write(DataBuffer stackBuffer,
                  int offset,
                  boolean invokedByCallback)
           throws MemoryAccessViolationException
Description copied from class: Parameter
Writes this parameter to a specified data source.

Specified by:
write in class Parameter
Throws:
MemoryAccessViolationException

read

public void read(DataBuffer stackBuffer,
                 int offset,
                 boolean invokedByCallback)
          throws MemoryAccessViolationException
Description copied from class: Parameter
Reads this parameter from a specified data source.

Specified by:
read in class Parameter
Throws:
MemoryAccessViolationException

push

public void push(DataBuffer stackBuffer,
                 int offset,
                 boolean invokedByCallback)
          throws MemoryAccessViolationException
Description copied from class: Parameter
Writes a parameter to a function stacks.

Overrides:
push in class Parameter
Throws:
MemoryAccessViolationException

pop

public void pop(DataBuffer stackBuffer,
                int offset,
                boolean invokedByCallback)
         throws MemoryAccessViolationException
Description copied from class: Parameter
Default implementation that does nothing because most primitive types do nothing on pop. Reads a parameter from a function stack.

Overrides:
pop in class Parameter
Throws:
MemoryAccessViolationException

getDebugInfo

public java.lang.String getDebugInfo()
Description copied from class: Parameter
Return debug info for JNIWrapper parameter.

Specified by:
getDebugInfo in class Parameter
Returns:
debug info

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object