com.ochafik.lang.jnaerator.runtime
Class Union<S extends Union<S,V,R>,V extends S,R extends S>
java.lang.Object
com.sun.jna.Structure
com.sun.jna.Union
com.ochafik.lang.jnaerator.runtime.Union<S,V,R>
- All Implemented Interfaces:
- StructureType, StructureTypeDependent
public abstract class Union<S extends Union<S,V,R>,V extends S,R extends S>
- extends Union
- implements StructureType, StructureTypeDependent
Constructor Summary |
Union()
|
Methods inherited from class com.sun.jna.Structure |
allocateMemory, allocateMemory, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, clear, ensureAllocated, equals, getAutoRead, getAutoWrite, getBitsAnnotation, getFieldOrder, getPointer, getStructAlignment, hashCode, newInstance, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setTypeMapper, size, sortFields, toString, useMemory, useMemory |
Union
public Union()
setDependency
public void setDependency(StructureType type)
- Specified by:
setDependency
in interface StructureTypeDependent
readDependency
protected void readDependency()
read
public void read()
- Description copied from class:
Structure
- Reads the fields of the struct from native memory
- Specified by:
read
in interface StructureType
- Overrides:
read
in class Structure
write
public void write()
- Description copied from class:
Structure
- Writes the fields of the struct to native memory
- Specified by:
write
in interface StructureType
- Overrides:
write
in class Structure
toArray
@Deprecated
public S[] toArray(int size)
- Deprecated. use castToArray instead
- Description copied from class:
Structure
- Returns a view of this structure's memory as an array of structures.
Note that this
Structure
must have a public, no-arg
constructor. If the structure is currently using auto-allocated
Memory
backing, the memory will be resized to fit the entire
array.
- Overrides:
toArray
in class Structure
toArray
@Deprecated
public S[] toArray()
- Deprecated. use castToArray instead
toArray
@Deprecated
public S[] toArray(Structure[] array)
- Deprecated. use castToArray instead
- Description copied from class:
Structure
- Returns a view of this structure's memory as an array of structures.
Note that this
Structure
must have a public, no-arg
constructor. If the structure is currently using auto-allocated
Memory
backing, the memory will be resized to fit the entire
array.
- Overrides:
toArray
in class Structure
castToArray
public S[] castToArray(int size)
castToArray
public S[] castToArray()
castToArray
public S[] castToArray(Structure[] array)
newArray
public static <S extends Union> S[] newArray(Class<S> structClass,
int arrayLength)
newInstance
protected abstract S newInstance()
newByValue
protected abstract V newByValue()
newByReference
protected abstract R newByReference()
byReference
public R byReference()
byValue
public V byValue()
clone
public S clone()
- Overrides:
clone
in class Object
setupClone
protected <T extends Union<?,?,?>> T setupClone(T clone)
use
public S use(Pointer m)
- Specified by:
use
in interface StructureType
use
public S use(Pointer m,
long byteOffset)
use
public S use(Buffer m)
use
public S use(Buffer b,
long byteOffset)
Copyright © 2009. All Rights Reserved.