Record Class Mapping.Pointer
java.lang.Object
java.lang.Record
org.lwjgl.system.ffm.mapping.Mapping.Pointer
- All Implemented Interfaces:
DataMapping<AddressLayout>, Mapping<AddressLayout>
- Enclosing interface:
Mapping<L extends MemoryLayout>
public static record Mapping.Pointer(AddressLayout layout)
extends Record
implements DataMapping<AddressLayout>
Mapping from
ValueLayout.ADDRESS to a C pointer.-
Nested Class Summary
Nested classes/interfaces inherited from interface Mapping
Mapping.Boolean, Mapping.Byte, Mapping.Char, Mapping.CLong, Mapping.Double, Mapping.Float, Mapping.Int, Mapping.Long, Mapping.Opaque, Mapping.Pointer, Mapping.Sequence, Mapping.Short, Mapping.Size, Mapping.Struct, Mapping.Union -
Constructor Summary
ConstructorsConstructorDescriptionPointer(AddressLayout layout) Creates an instance of aPointerrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncconst()Creates a new instance of this mapping with the Cconstqualifierfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.layout()Returns the value of thelayoutrecord component.final StringtoString()Returns a string representation of this record class.Creates a new instance of this mapping with the specified type name.withByteAlignment(long byteAlignment) Returns a copy of this mapping with the specified byte alignment.Methods inherited from interface DataMapping
allocateSegment, allocateSegment, allocateSegment, allocateSegment, array, mallocSegment, mallocSegment
-
Constructor Details
-
Pointer
Creates an instance of aPointerrecord class.- Parameters:
layout- the value for thelayoutrecord component
-
-
Method Details
-
withByteAlignment
Description copied from interface:DataMappingReturns a copy of this mapping with the specified byte alignment.- Specified by:
withByteAlignmentin interfaceDataMapping<AddressLayout>- Parameters:
byteAlignment- the new byte alignment- Returns:
- the new mapping
-
typedef
Description copied from interface:MappingCreates a new instance of this mapping with the specified type name.- Specified by:
typedefin interfaceMapping<AddressLayout>- Returns:
- the new mapping
-
cconst
Description copied from interface:MappingCreates a new instance of this mapping with the Cconstqualifier- Specified by:
cconstin interfaceMapping<AddressLayout>- Returns:
- the new mapping
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
layout
Returns the value of thelayoutrecord component.- Specified by:
layoutin interfaceMapping<AddressLayout>- Returns:
- the value of the
layoutrecord component
-