public enum PrimitiveWideningDelegate extends Enum<PrimitiveWideningDelegate>
Modifier and Type | Class and Description |
---|---|
protected static class |
PrimitiveWideningDelegate.WideningStackManipulation
A stack manipulation that widens a primitive type into a more general primitive type.
|
Enum Constant and Description |
---|
BOOLEAN
The widening delegate for
boolean values. |
BYTE
The widening delegate for
byte values. |
CHARACTER
The widening delegate for
char values. |
DOUBLE
The widening delegate for
double values. |
FLOAT
The widening delegate for
float values. |
INTEGER
The widening delegate for
int values. |
LONG
The widening delegate for
long values. |
SHORT
The widening delegate for
short values. |
Modifier and Type | Method and Description |
---|---|
static PrimitiveWideningDelegate |
forPrimitive(TypeDefinition typeDefinition)
Locates the delegate that is capable of widening the given type into another type.
|
static PrimitiveWideningDelegate |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PrimitiveWideningDelegate[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
StackManipulation |
widenTo(TypeDefinition typeDefinition)
Attempts to widen the represented type into another type.
|
public static final PrimitiveWideningDelegate BOOLEAN
boolean
values.public static final PrimitiveWideningDelegate BYTE
byte
values.public static final PrimitiveWideningDelegate SHORT
short
values.public static final PrimitiveWideningDelegate CHARACTER
char
values.public static final PrimitiveWideningDelegate INTEGER
int
values.public static final PrimitiveWideningDelegate LONG
long
values.public static final PrimitiveWideningDelegate FLOAT
float
values.public static final PrimitiveWideningDelegate DOUBLE
double
values.public static PrimitiveWideningDelegate[] values()
for (PrimitiveWideningDelegate c : PrimitiveWideningDelegate.values()) System.out.println(c);
public static PrimitiveWideningDelegate 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 PrimitiveWideningDelegate forPrimitive(TypeDefinition typeDefinition)
typeDefinition
- A non-void primitive type that is to be widened into another type.public StackManipulation widenTo(TypeDefinition typeDefinition)
typeDefinition
- A non-void primitive type that is the expected result of the widening operation.Copyright © 2014–2024. All rights reserved.