com.jniwrapper
Class Pointer.Const

java.lang.Object
  extended by com.jniwrapper.Parameter
      extended by com.jniwrapper.Pointer
          extended by com.jniwrapper.Pointer.Const
All Implemented Interfaces:
PointerParameter
Enclosing class:
Pointer

public static class Pointer.Const
extends Pointer

Represents a pointer to constant object.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jniwrapper.Pointer
Pointer.Const, Pointer.OutOnly, Pointer.Void
 
Field Summary
 
Fields inherited from class com.jniwrapper.Pointer
POINTER_LENGTH
 
Fields inherited from class com.jniwrapper.Parameter
LICENSE_TYPE, V
 
Constructor Summary
Pointer.Const(java.lang.Class parameterClass)
           
Pointer.Const(Parameter ref)
          Constructs a new pointer to a given object.
Pointer.Const(Parameter ref, boolean isNull)
          Constructs a new pointer to a given object.
 
Method Summary
 java.lang.Object clone()
           
 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 write(DataBuffer stackBuffer, int offset, boolean invokedByCallback)
          Writes this parameter to a specified data source.
 
Methods inherited from class com.jniwrapper.Pointer
acceptIOPerformer, asTypedPointer, asVoidPointer, castTo, castTo, checkMemHandleLength, equals, getDebugInfo, getLength, getParameterClass, getPointerHandle, getReferencedObject, isNull, read, read, readPointer, readReferencedObject, setExternalSource, setNull, setReferencedObject, setReferencedObject, write, writePointer, writeReferencedObject
 
Methods inherited from class com.jniwrapper.Parameter
asReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, hashCode, indent, read, setDataBuffer, toByteArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pointer.Const

public Pointer.Const(Parameter ref)
Constructs a new pointer to a given object. The constructed pointer is a non-null pointer parameter that points to the given object.

Parameters:
ref - referenced object.

Pointer.Const

public Pointer.Const(Parameter ref,
                     boolean isNull)
Constructs a new pointer to a given object. The constructed pointer may be nul, in which case a referenced object value is not used or updated until the pointer value is changed to non-null by native function.

Parameters:
ref - referenced object
isNull - if true the constructed pointer is null.

Pointer.Const

public Pointer.Const(java.lang.Class parameterClass)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class Pointer

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.

Overrides:
write in class Pointer
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 Pointer
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 Pointer
Throws:
MemoryAccessViolationException