A to another type B if possible.
An assigner is for example responsible for type casting, auto boxing or unboxing or for the widening of primitive types.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Assigner.EqualTypesOnly
An assigner that only allows to assign types if they are equal to another. |
| public static enum | Assigner.Refusing
An assigner that does not allow any assignments. |
| public static enum | Assigner.Typing
Indicates for a type assignment, if a type casting should be applied in case that two types are not statically assignable. |
| Modifier and Type | Field and Description |
|---|---|
| public static final Assigner | DEFAULT
A default assigner that can handle |
| public static final Assigner | GENERICS_AWARE
A generics-aware assigner that can handle |
| Modifier and Type | Method and Description |
|---|---|
| public StackManipulation | Returns: A stack manipulation that transforms thesourceType into the targetType if this
is possible. An illegal stack manipulation otherwise.The original type that is to be transformed into the source,targetType.The target type into which the target,sourceType is to be converted.A hint whether the assignment should consider the runtime type of the source type,
i.e. if type down or cross castings are allowed. If this hint is set, this is
also an indication that typingvoid to non-void assignments are permitted.
|
| DEFAULT | back to summary |
|---|---|
| public static final Assigner DEFAULT A default assigner that can handle | |
| GENERICS_AWARE | back to summary |
|---|---|
| public static final Assigner GENERICS_AWARE A generics-aware assigner that can handle | |
| assign | back to summary |
|---|---|
public StackManipulation assign(TypeDescription.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Assigner. | ERASURE
A type assigner that considers two generic types to be equal if their erasure is equal. |
| public static final Assigner. | GENERIC
An type assigner that only considers equal generic types to be assignable. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Assigner. | |
| public static Assigner. |
| ERASURE | back to summary |
|---|---|
| public static final Assigner. A type assigner that considers two generic types to be equal if their erasure is equal. | |
| GENERIC | back to summary |
|---|---|
| public static final Assigner. An type assigner that only considers equal generic types to be assignable. | |
| EqualTypesOnly | back to summary |
|---|---|
| private EqualTypesOnly() | |
| valueOf | back to summary |
|---|---|
| public static Assigner. | |
| values | back to summary |
|---|---|
| public static Assigner. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Assigner. | INSTANCE
The singleton instance. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public StackManipulation | assign(TypeDescription.
The original type that is to be transformed into the source,targetType.The target type into which the target,sourceType is to be converted.A hint whether the assignment should consider the runtime type of the source type,
i.e. if type down or cross castings are allowed. If this hint is set, this is
also an indication that typingvoid to non-void assignments are permitted.Implements net. |
| public static Assigner. | |
| public static Assigner. |
| INSTANCE | back to summary |
|---|---|
| public static final Assigner. The singleton instance. | |
| Refusing | back to summary |
|---|---|
| private Refusing() | |
| assign | back to summary |
|---|---|
| public StackManipulation assign(TypeDescription. Implements net.
| |
| valueOf | back to summary |
|---|---|
| public static Assigner. | |
| values | back to summary |
|---|---|
| public static Assigner. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Assigner. | DYNAMIC
Allows dynamic typing. |
| private final boolean | dynamic
|
| public static final Assigner. | STATIC
Requires static typing. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if dynamic typing is a legitimate choice.Checks if this instance's typing behavior permits dynamic typing. |
| public static Assigner. | Returns: A corresponding typing constant.An indicator for if dynamic typing is a legitimate choice. dynamic)Resolves a typing constant for the presented boolean where |
| public static Assigner. | |
| public static Assigner. |
| DYNAMIC | back to summary |
|---|---|
| public static final Assigner. Allows dynamic typing. | |
| dynamic | back to summary |
|---|---|
| private final boolean dynamic
| |
| STATIC | back to summary |
|---|---|
| public static final Assigner. Requires static typing. | |
| Typing | back to summary |
|---|---|
| private Typing(boolean dynamic) Creates a new typing hint.
| |
| isDynamic | back to summary |
|---|---|
| public boolean isDynamic() Checks if this instance's typing behavior permits dynamic typing.
| |
| of | back to summary |
|---|---|
| public static Assigner. Resolves a typing constant for the presented boolean where | |
| valueOf | back to summary |
|---|---|
| public static Assigner. | |
| values | back to summary |
|---|---|
| public static Assigner. | |