Record Class LayoutRequirement
java.lang.Object
java.lang.Record
net.codecrete.windowsapi.winmd.LayoutRequirement
- Record Components:
size- the size (in bytes)alignment- the required alignment (in bytes)
Size and alignment of a type.
Instances of this record are used once the StructLayouter has been run.
-
Constructor Summary
ConstructorsConstructorDescriptionLayoutRequirement(int size, int alignment) Creates an instance of aLayoutRequirementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thealignmentrecord component.final booleanIndicates whether some other object is "equal to" this one.static LayoutRequirementforPrimitive(Primitive type) Gets the layout requirement for a primitive type.static LayoutRequirementGets the given type's layout requirements.final inthashCode()Returns a hash code value for this object.static intprimitiveSize(Primitive type) Gets the size of a primitive type.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LayoutRequirement
-
-
Method Details
-
forType
Gets the given type's layout requirements.- Parameters:
type- the type- Returns:
- the layout requirement
-
primitiveSize
Gets the size of a primitive type.- Parameters:
type- the primitive type- Returns:
- the size (in bytes)
-
forPrimitive
Gets the layout requirement for a primitive type.- Parameters:
type- the primitive type- Returns:
- the layout requirement
-
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 with thecomparemethod from their corresponding wrapper classes. -
size
-
alignment
-