Interface Mapping<L extends MemoryLayout>
- All Known Subinterfaces:
DataMapping<L>, GroupBinder<L,T>, GroupMapping<L>, IntegerMapping<L>, Mapping.Byte, Mapping.CLong, Mapping.Int, Mapping.Long, Mapping.Short, Mapping.Size, PrimitiveMapping<L>, StructBinder<T>, UnionBinder<T>
- All Known Implementing Classes:
Mapping.Boolean, Mapping.Char, Mapping.Double, Mapping.Float, Mapping.Opaque, Mapping.Pointer, Mapping.Sequence, Mapping.Struct, Mapping.Union
public interface Mapping<L extends MemoryLayout>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordMapping fromValueLayout.JAVA_BOOLEANto Cbool.static interfacestatic final recordMapping fromValueLayout.JAVA_CHARto Cuint16_t.static interfacestatic final recordMapping fromValueLayout.JAVA_DOUBLEto Cdouble.static final recordMapping fromValueLayout.JAVA_FLOATto Cfloat.static interfacestatic interfacestatic final recordstatic final recordMapping fromValueLayout.ADDRESSto a C pointer.static final recordMapping fromSequenceLayoutto a C array.static interfacestatic interfaceMapping fromValueLayout.ADDRESSto an integer ofsizeof(size_t)bytes.static final recordMapping fromStructLayoutto a C struct.static final recordMapping fromUnionLayoutto a C union. -
Method Summary
Modifier and TypeMethodDescriptioncconst()Creates a new instance of this mapping with the Cconstqualifierstatic Mapping.BooleancreateBoolean(String name) Creates a boolean mapping with the specified name.static Mapping.BytecreateByte(String name, boolean signed) Creates a byte mapping with the specified name.static Mapping.CharcreateChar(String name) Creates a char mapping with the specified name.static Mapping.CLongcreateCLong(String name, boolean signed) Creates a C long mapping with the specified name.static Mapping.DoublecreateDouble(String name) Creates a double mapping with the specified name.static Mapping.FloatcreateFloat(String name) Creates a float mapping with the specified name.static Mapping.IntCreates an int mapping with the specified name.static Mapping.LongcreateLong(String name, boolean signed) Creates a long mapping with the specified name.static Mapping.OpaquecreateOpaque(String name) Creates an opaque mapping with the specified name.static Mapping.ShortcreateShort(String name, boolean signed) Creates a short mapping with the specified name.static Mapping.SizecreateSize(String name, boolean signed) Creates asize_tinteger mapping with the specified name.layout()Returns the layout associated with this mapping.default Mapping.Pointerp()Creates a pointer mapping that targets this mapping.Creates a new instance of this mapping with the specified type name.
-
Method Details
-
layout
-
typedef
-
cconst
-
p
Creates a pointer mapping that targets this mapping.- Returns:
- the pointer mapping
-
createOpaque
Creates an opaque mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createBoolean
Creates a boolean mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createByte
Creates a byte mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createChar
Creates a char mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createShort
Creates a short mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createInt
Creates an int mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createLong
Creates a long mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createCLong
Creates a C long mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createSize
Creates asize_tinteger mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createFloat
Creates a float mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-
createDouble
Creates a double mapping with the specified name.- Parameters:
name- the type name- Returns:
- the new mapping
-