|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjnr.ffi.Type
public abstract class Type
Type is the superclass for all internal types used by jnr-ffi.
Use this type to access meta-data about a native type, such as its size or natural alignment.
To obtain an instance of this class, use Runtime.findType(NativeType) or
Runtime.findType(TypeAlias).
Example
Type pointerType = runtime.findType(NativeType.ADDRESS);
System.out.println("The size of a pointer on this platform is " + pointerType.size());
| Constructor Summary | |
|---|---|
Type()
|
|
| Method Summary | |
|---|---|
abstract int |
alignment()
The native alignment of this type, in bytes |
abstract NativeType |
getNativeType()
The native type of this type |
abstract int |
size()
The size in bytes of this type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Type()
| Method Detail |
|---|
public abstract int size()
public abstract int alignment()
public abstract NativeType getNativeType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||