Enum Class ReferenceTypeAwareAssigner
java.lang.Object
java.lang.Enum<ReferenceTypeAwareAssigner>
net.bytebuddy.implementation.bytecode.assign.reference.ReferenceTypeAwareAssigner
- All Implemented Interfaces:
Serializable
,Comparable<ReferenceTypeAwareAssigner>
,Constable
,Assigner
A simple assigner that is capable of handling the casting of reference types. Primitives can only be assigned to
each other if they represent the same type.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.assign.Assigner
Assigner.EqualTypesOnly, Assigner.Refusing, Assigner.Typing
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields inherited from interface net.bytebuddy.implementation.bytecode.assign.Assigner
DEFAULT, GENERICS_AWARE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassign
(TypeDescription.Generic source, TypeDescription.Generic target, Assigner.Typing typing) static ReferenceTypeAwareAssigner
Returns the enum constant of this class with the specified name.static ReferenceTypeAwareAssigner[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
ReferenceTypeAwareAssigner
private ReferenceTypeAwareAssigner()
-
-
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
-
assign
public StackManipulation assign(TypeDescription.Generic source, TypeDescription.Generic target, Assigner.Typing typing) - Specified by:
assign
in interfaceAssigner
- Parameters:
source
- The original type that is to be transformed into thetargetType
.target
- The target type into which thesourceType
is to be converted.typing
- 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 thatvoid
to non-void
assignments are permitted.- Returns:
- A stack manipulation that transforms the
sourceType
into thetargetType
if this is possible. An illegal stack manipulation otherwise.
-