Enum JavaDispatcher.Dispatcher.ForDefaultValue
java.lang.Object
java.lang.Enum<JavaDispatcher.Dispatcher.ForDefaultValue>
net.bytebuddy.utility.dispatcher.JavaDispatcher.Dispatcher.ForDefaultValue
- All Implemented Interfaces:
Serializable, Comparable<JavaDispatcher.Dispatcher.ForDefaultValue>, java.lang.constant.Constable, JavaDispatcher.Dispatcher
- Enclosing interface:
JavaDispatcher.Dispatcher
public static enum JavaDispatcher.Dispatcher.ForDefaultValue
extends Enum<JavaDispatcher.Dispatcher.ForDefaultValue>
implements JavaDispatcher.Dispatcher
A dispatcher that returns a fixed value.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA dispatcher for a non-primitive array type.protected static enumA dispatcher for returning a default value for a primitive array.Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface JavaDispatcher.Dispatcher
JavaDispatcher.Dispatcher.ForConstructor, JavaDispatcher.Dispatcher.ForContainerCreation, JavaDispatcher.Dispatcher.ForDefaultValue, JavaDispatcher.Dispatcher.ForInstanceCheck, JavaDispatcher.Dispatcher.ForNonStaticMethod, JavaDispatcher.Dispatcher.ForStaticMethod, JavaDispatcher.Dispatcher.ForUnresolvedMethod -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA dispatcher for abooleantype.A dispatcher for abooleantype that returnstrue.A dispatcher for abytetype.A dispatcher for achartype.A dispatcher for adoubletype.A dispatcher for afloattype.A dispatcher for aninttype.A dispatcher for alongtype.A dispatcher for a reference type.A dispatcher for ashorttype.A dispatcher for avoidtype. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateForDefaultValue(Object value, int load, int returned, int size) Creates a new default value dispatcher. -
Method Summary
Modifier and TypeMethodDescriptionintImplements this dispatcher in a generated proxy.Invokes the proxied action.protected static JavaDispatcher.DispatcherResolves a fixed value for a given type.Returns the enum constant of this type with the specified name.values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VOID
A dispatcher for avoidtype. -
BOOLEAN
A dispatcher for abooleantype. -
BOOLEAN_REVERSE
A dispatcher for abooleantype that returnstrue. -
BYTE
A dispatcher for abytetype. -
SHORT
A dispatcher for ashorttype. -
CHARACTER
A dispatcher for achartype. -
INTEGER
A dispatcher for aninttype. -
LONG
A dispatcher for alongtype. -
FLOAT
A dispatcher for afloattype. -
DOUBLE
A dispatcher for adoubletype. -
REFERENCE
A dispatcher for a reference type.
-
-
Field Details
-
value
The default value. -
load
private final int loadThe opcode to load the default value. -
returned
private final int returnedThe opcode to return the default value. -
size
private final int sizeThe operand stack size of default value.
-
-
Constructor Details
-
ForDefaultValue
Creates a new default value dispatcher.- Parameters:
value- The default value.load- The opcode to load the default value.returned- The opcode to return the default value.size- The operand stack size of default value.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
of
Resolves a fixed value for a given type.- Parameters:
type- The type to resolve.- Returns:
- An appropriate dispatcher.
-
invoke
Invokes the proxied action.- Specified by:
invokein interfaceJavaDispatcher.Dispatcher- Parameters:
argument- The arguments provided.- Returns:
- The return value.
-
apply
Implements this dispatcher in a generated proxy.- Specified by:
applyin interfaceJavaDispatcher.Dispatcher- Parameters:
methodVisitor- The method visitor to implement the method with.method- The method being implemented.- Returns:
- The maximal size of the operand stack.
-