Package net.bytebuddy.implementation
Enum Class InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper
java.lang.Object
java.lang.Enum<InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper>
net.bytebuddy.implementation.InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper
- All Implemented Interfaces:
Serializable
,Comparable<InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper>
,Constable
- Enclosing interface:
InvokeDynamic.InvocationProvider.ArgumentProvider
public static enum InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper
extends Enum<InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper>
Represents wrapper types and types that could be stored in a class's constant pool as such
constant pool values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
An argument provider that loads a primitive value from the constant pool and wraps it.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStores aBoolean
as aboolean
and wraps it on load.Stores aByte
as abyte
and wraps it on load.Stores aCharacter
as achar
and wraps it on load.Stores aDouble
as adouble
and wraps it on load.Stores aFloat
as afloat
and wraps it on load.Stores aInteger
as aint
and wraps it on load.Stores aLong
as along
and wraps it on load.Stores aShort
as ashort
and wraps it on load. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDescription
The primitive type that can be stored on the constant pool.private final TypeDescription
The wrapper type that is to be represented. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ConstantPoolWrapper
(Class<?> primitiveType, Class<?> wrapperType) Creates a new wrapper delegate for a primitive type. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract InvokeDynamic.InvocationProvider.ArgumentProvider
Creates an argument provider for a given primitive value.Represents the given value by a constant pool value or as a field if this is not possible.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOOLEAN
Stores aBoolean
as aboolean
and wraps it on load. -
BYTE
Stores aByte
as abyte
and wraps it on load. -
SHORT
Stores aShort
as ashort
and wraps it on load. -
CHARACTER
Stores aCharacter
as achar
and wraps it on load. -
INTEGER
Stores aInteger
as aint
and wraps it on load. -
LONG
Stores aLong
as along
and wraps it on load. -
FLOAT
Stores aFloat
as afloat
and wraps it on load. -
DOUBLE
Stores aDouble
as adouble
and wraps it on load.
-
-
Field Details
-
primitiveType
The primitive type that can be stored on the constant pool. -
wrapperType
The wrapper type that is to be represented.
-
-
Constructor Details
-
ConstantPoolWrapper
Creates a new wrapper delegate for a primitive type.- Parameters:
primitiveType
- The primitive type that can be stored on the constant pool.wrapperType
- The wrapper type that is to be represented.
-
-
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
public static InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper valueOf(String name) 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
-
of
Represents the given value by a constant pool value or as a field if this is not possible.- Parameters:
value
- The value to provide to the bootstrapped method.- Returns:
- An argument provider for this value.
-
make
Creates an argument provider for a given primitive value.- Parameters:
value
- The wrapper-type value to provide to the bootstrapped method.- Returns:
- An argument provider for this value.
-