Package com.kenai.jffi
Class Array
- java.lang.Object
-
- com.kenai.jffi.Type
-
- com.kenai.jffi.Aggregate
-
- com.kenai.jffi.Array
-
public final class Array extends Aggregate
Describes the layout of a C array
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.kenai.jffi.Type
Type.Builtin, Type.TypeInfo
-
-
Field Summary
Fields Modifier and Type Field Description private TypeelementTypeprivate intlength
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)TypegetElementType()Returns the type of elements in the arrayinthashCode()intlength()Returns the number of elements in the arraystatic ArraynewArray(Type elementType, int length)Creates a new C array layout description.-
Methods inherited from class com.kenai.jffi.Aggregate
dispose, getTypeInfo
-
Methods inherited from class com.kenai.jffi.Type
alignment, handle, nativeHandles, nativeHandles, size, type
-
-
-
-
Field Detail
-
elementType
private final Type elementType
-
length
private final int length
-
-
Constructor Detail
-
Array
public Array(Type elementType, int length)
Creates a new C array layout description.- Parameters:
elementType- The type of fields contained in the struct.length- the number of elements.
-
-
Method Detail
-
newArray
public static Array newArray(Type elementType, int length)
Creates a new C array layout description.- Parameters:
elementType- The type of each element of the arraylength- The length of the array.
-
getElementType
public final Type getElementType()
Returns the type of elements in the array- Returns:
- The
Typeof the elements in the array
-
length
public final int length()
Returns the number of elements in the array- Returns:
- The number of elements in the array
-
-