com.jniwrapper
Class Pointer.Void

java.lang.Object
  extended by com.jniwrapper.Parameter
      extended by com.jniwrapper.Pointer.Void
All Implemented Interfaces:
IntegerParameter, PointerParameter
Direct Known Subclasses:
ExternalStringPointer
Enclosing class:
Pointer

public static class Pointer.Void
extends Parameter
implements IntegerParameter, PointerParameter

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.


Field Summary
 
Fields inherited from class com.jniwrapper.Parameter
LICENSE_TYPE, V
 
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 target)
          Deprecated. use castTo(Pointer) method instead
 void castTo(Pointer.Void target)
          Casts this pointer to the another void pointer.
 void castTo(Pointer target)
          Casts this pointer to the given typed pointer.
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
          Compares this Parameter object to a given object.
 java.lang.String getDebugInfo()
          Converts this pointer to string representation.
 int getLength()
          Returns the 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()
           
 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, pop, push, read, 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 the length of the parameter in memory. This method is similar 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
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

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.

Specified by:
isNull in interface PointerParameter
Returns:
true if this pointer is null; false otherwise

getDebugInfo

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

Specified by:
getDebugInfo in class Parameter
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 target)
Deprecated. use castTo(Pointer) method instead

Assigns this pointer value to the typed pointer.

Parameters:
target - void pointer.

castTo

public void castTo(Pointer target)
Casts this pointer to the given typed pointer.

Parameters:
target - the target typed pointer

castTo

public void castTo(Pointer.Void target)
Casts this pointer to the another void pointer.

Parameters:
target - the target void pointer

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

toString

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