public class VoidAwareAssigner extends Object implements Assigner
void type. This means:
void type is assigned to the void it will consider this a trivial operation.void type is assigned to a non-void type, it will pop the top value from the stack.void type is assigned to a void type, it will load the target type's default value
only if this was configured at the assigner's construction.void types are subject of the assignment, it will delegate the assignment to its chained
assigner.Assigner.EqualTypesOnly, Assigner.Refusing| Constructor and Description |
|---|
VoidAwareAssigner(Assigner chained)
Creates a new assigner that is capable of handling void types.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation |
assign(TypeDescription sourceType,
TypeDescription targetType,
boolean dynamicallyTyped) |
boolean |
equals(Object other) |
int |
hashCode() |
String |
toString() |
public VoidAwareAssigner(Assigner chained)
chained - A chained assigner which will be queried by this assigner to handle assignments that
do not involve a void type.public StackManipulation assign(TypeDescription sourceType, TypeDescription targetType, boolean dynamicallyTyped)
assign in interface AssignersourceType - The original type that is to be transformed into the targetType.targetType - The target type into which the sourceType is to be converted.dynamicallyTyped - 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 void to non-void assignments are permitted.sourceType into the targetType if this
is possible. An illegal stack manipulation otherwise.Copyright © 2014–2015. All rights reserved.