Package net.bytebuddy.utility.dispatcher
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 class
A dispatcher for a non-primitive array type.protected static enum
A dispatcher for returning a default value for a primitive array.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.utility.dispatcher.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 aboolean
type.A dispatcher for aboolean
type that returnstrue
.A dispatcher for abyte
type.A dispatcher for achar
type.A dispatcher for adouble
type.A dispatcher for afloat
type.A dispatcher for anint
type.A dispatcher for along
type.A dispatcher for a reference type.A dispatcher for ashort
type.A dispatcher for avoid
type. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ForDefaultValue
(Object value, int load, int returned, int size) Creates a new default value dispatcher. -
Method Summary
Modifier and TypeMethodDescriptionint
Implements this dispatcher in a generated proxy.Invokes the proxied action.protected static JavaDispatcher.Dispatcher
Resolves 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 avoid
type. -
BOOLEAN
A dispatcher for aboolean
type. -
BOOLEAN_REVERSE
A dispatcher for aboolean
type that returnstrue
. -
BYTE
A dispatcher for abyte
type. -
SHORT
A dispatcher for ashort
type. -
CHARACTER
A dispatcher for achar
type. -
INTEGER
A dispatcher for anint
type. -
LONG
A dispatcher for along
type. -
FLOAT
A dispatcher for afloat
type. -
DOUBLE
A dispatcher for adouble
type. -
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:
invoke
in interfaceJavaDispatcher.Dispatcher
- Parameters:
argument
- The arguments provided.- Returns:
- The return value.
-
apply
Implements this dispatcher in a generated proxy.- Specified by:
apply
in 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.
-