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.| Constructor and Description |
|---|
VoidAwareAssigner(Assigner chained,
boolean returnDefaultValue)
Creates a new assigner that is capable of handling void types.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation |
assign(TypeDescription sourceType,
TypeDescription targetType,
boolean considerRuntimeType) |
boolean |
equals(Object other) |
int |
hashCode() |
String |
toString() |
public VoidAwareAssigner(Assigner chained, boolean returnDefaultValue)
chained - A chained assigner which will be queried by this assigner to handle assignments that
do not involve a void type.returnDefaultValue - Determines if this assigner will load a target type's default value onto the stack if
a void type is assigned to a non-void type.public StackManipulation assign(TypeDescription sourceType, TypeDescription targetType, boolean considerRuntimeType)
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.considerRuntimeType - A hint whether the assignment should consider the runtime type of the source type,
i.e. if type down or cross castings are allowed.sourceType into the targetType if this
is possible. An illegal stack manipulation otherwise.Copyright © 2014. All rights reserved.