com.jniwrapper
Class Pointer.Void

java.lang.Object
  |
  +--com.jniwrapper.Parameter
        |
        +--com.jniwrapper.Pointer.Void
All Implemented Interfaces:
IntegerParameter
Direct Known Subclasses:
Handle
Enclosing class:
Pointer

public static class Pointer.Void
extends Parameter
implements IntegerParameter

Represents a void *. This pointer can be used for parameters where the referenced object type/size is not known or is of no interest for the client.


Constructor Summary
Pointer.Void()
          Constructs a new null pointer.
Pointer.Void(long value)
          Constructs a new void pointer that has the given value.
Pointer.Void(Pointer.Void that)
           
 
Method Summary
 Function asFunction()
          Converts this poiter to a function.
 Function asFunction(byte callingConvention)
          Converts this poiter to a function.
 void asTypedPointer(Pointer destPtr)
           
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
          Compares this Parameter object to a given object.
 int getLength()
          Returns a length of the parameter in memory.
 long getValue()
          Returns handle value of this object.
 int hashCode()
           
 boolean isNull()
          Tests if this pointer is null.
 void read(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Reads this parameter from a specified data source.
 void setValue(long value)
          Sets handle value of this pointer.
 java.lang.String toString()
          Converts this pointer to string representation.
 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, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pointer.Void

public Pointer.Void()
Constructs a new null pointer.


Pointer.Void

public Pointer.Void(long value)
Constructs a new void pointer that has the given value. Use this method for constructing special constants such as (HWND)-1.


Pointer.Void

public Pointer.Void(Pointer.Void that)
Method Detail

getLength

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

Specified by:
getLength 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
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
MemoryAccessViolationException

clone

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

setValue

public void setValue(long value)
Sets handle value of this pointer.

Specified by:
setValue in interface IntegerParameter

getValue

public long getValue()
Returns handle value of this object.

Specified by:
getValue in interface IntegerParameter

isNull

public boolean isNull()
Tests if this pointer is null.


toString

public java.lang.String toString()
Converts this pointer to string representation.

Overrides:
toString in class java.lang.Object
Returns:
string "(void*)0x[pointer_value_in_hexadecimal_format]"

asFunction

public Function asFunction()
Converts this poiter to a function.

Since:
1.2

asFunction

public Function asFunction(byte callingConvention)
Converts this poiter to a function.

Parameters:
callingConvention - calling convention.
Since:
1.2

asTypedPointer

public void asTypedPointer(Pointer destPtr)

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 - value to compare this object to
Returns:
true if two objects are equal.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object