public enum PrimitiveNarrowingDelegate extends Enum<PrimitiveNarrowingDelegate>
Modifier and Type | Class and Description |
---|---|
protected static class |
PrimitiveNarrowingDelegate.NarrowingStackManipulation
A stack manipulation that narrows a primitive type into a smaller primitive type.
|
Enum Constant and Description |
---|
BOOLEAN
The narrowing delegate for
boolean values. |
BYTE
The narrowing delegate for
byte values. |
CHARACTER
The narrowing delegate for
char values. |
DOUBLE
The narrowing delegate for
double values. |
FLOAT
The narrowing delegate for
float values. |
INTEGER
The narrowing delegate for
int values. |
LONG
The narrowing delegate for
long values. |
SHORT
The narrowing delegate for
short values. |
Modifier and Type | Method and Description |
---|---|
static PrimitiveNarrowingDelegate |
forPrimitive(TypeDefinition typeDefinition)
Locates the delegate that is capable of narrowing the given type into another type.
|
StackManipulation |
narrowTo(TypeDefinition typeDefinition)
Attempts to narrow the represented type into another type.
|
static PrimitiveNarrowingDelegate |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PrimitiveNarrowingDelegate[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PrimitiveNarrowingDelegate BOOLEAN
boolean
values.public static final PrimitiveNarrowingDelegate BYTE
byte
values.public static final PrimitiveNarrowingDelegate SHORT
short
values.public static final PrimitiveNarrowingDelegate CHARACTER
char
values.public static final PrimitiveNarrowingDelegate INTEGER
int
values.public static final PrimitiveNarrowingDelegate LONG
long
values.public static final PrimitiveNarrowingDelegate FLOAT
float
values.public static final PrimitiveNarrowingDelegate DOUBLE
double
values.public static PrimitiveNarrowingDelegate[] values()
for (PrimitiveNarrowingDelegate c : PrimitiveNarrowingDelegate.values()) System.out.println(c);
public static PrimitiveNarrowingDelegate valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static PrimitiveNarrowingDelegate forPrimitive(TypeDefinition typeDefinition)
typeDefinition
- A non-void primitive type that is to be narrowed into another type.public StackManipulation narrowTo(TypeDefinition typeDefinition)
typeDefinition
- A non-void primitive type that is the expected result of the narrowing operation.Copyright © 2014–2025. All rights reserved.