- All Implemented Interfaces:
Serializable
,Comparable<CLinker.TypeKind>
,Constable
- Enclosing interface:
- CLinker
A C type kind. Each kind corresponds to a particular C language builtin type, and can be attached to
ValueLayout
instances using the MemoryLayout.withAttribute(String, Constable)
in order
to obtain a layout which can be classified accordingly by CLinker.downcallHandle(Addressable, MethodType, FunctionDescriptor)
and CLinker.upcallStub(MethodHandle, FunctionDescriptor, ResourceScope)
.-
Nested Class Summary
Nested classes/interfaces declared in class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA kind corresponding to the integral Cchar
typeA kind corresponding to the floating-point Cdouble
typeA kind corresponding to the floating-point Cfloat
typeA kind corresponding to the integral Cint
typeA kind corresponding to the integral Clong
typeA kind corresponding to the integral Clong long
typeA kind corresponding to the an integral C pointer typeA kind corresponding to the integral Cshort
type -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isFloat()
Is this kind a floating point type?boolean
Is this kind integral?boolean
Is this kind a pointer kind?static CLinker.TypeKind
Returns the enum constant of this class with the specified name.static CLinker.TypeKind[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CHAR
A kind corresponding to the integral Cchar
type -
SHORT
A kind corresponding to the integral Cshort
type -
INT
A kind corresponding to the integral Cint
type -
LONG
A kind corresponding to the integral Clong
type -
LONG_LONG
A kind corresponding to the integral Clong long
type -
FLOAT
A kind corresponding to the floating-point Cfloat
type -
DOUBLE
A kind corresponding to the floating-point Cdouble
type -
POINTER
A kind corresponding to the an integral C pointer type
-
-
Field Details
-
ATTR_NAME
The layout attribute name associated with this classification kind. Clients can retrieve the type kind of a layout using the following code:ValueLayout layout = ... TypeKind = layout.attribute(TypeKind.ATTR_NAME).orElse(null);
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isIntegral
public boolean isIntegral()Is this kind integral?- Returns:
- true if this kind is integral
-
isFloat
public boolean isFloat()Is this kind a floating point type?- Returns:
- true if this kind is a floating point type
-
isPointer
public boolean isPointer()Is this kind a pointer kind?- Returns:
- true if this kind is a pointer kind
-