Package net.bytebuddy.implementation
Enum InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper
- java.lang.Object
-
- java.lang.Enum<InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper>
-
- net.bytebuddy.implementation.InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper>
- Enclosing interface:
- InvokeDynamic.InvocationProvider.ArgumentProvider
public static enum InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper extends java.lang.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 Classes Modifier and Type Class Description protected classInvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper.WrappingArgumentProviderAn argument provider that loads a primitive value from the constant pool and wraps it.
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEANStores aBooleanas abooleanand wraps it on load.BYTEStores aByteas abyteand wraps it on load.CHARACTERStores aCharacteras acharand wraps it on load.DOUBLEStores aDoubleas adoubleand wraps it on load.FLOATStores aFloatas afloatand wraps it on load.INTEGERStores aIntegeras aintand wraps it on load.LONGStores aLongas alongand wraps it on load.SHORTStores aShortas ashortand wraps it on load.
-
Field Summary
Fields Modifier and Type Field Description private TypeDescriptionprimitiveTypeThe primitive type that can be stored on the constant pool.private TypeDescriptionwrapperTypeThe wrapper type that is to be represented.
-
Constructor Summary
Constructors Modifier Constructor Description privateConstantPoolWrapper(java.lang.Class<?> primitiveType, java.lang.Class<?> wrapperType)Creates a new wrapper delegate for a primitive type.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract InvokeDynamic.InvocationProvider.ArgumentProvidermake(java.lang.Object value)Creates an argument provider for a given primitive value.static InvokeDynamic.InvocationProvider.ArgumentProviderof(java.lang.Object value)Represents the given value by a constant pool value or as a field if this is not possible.static InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrappervalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper BOOLEAN
Stores aBooleanas abooleanand wraps it on load.
-
BYTE
public static final InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper BYTE
Stores aByteas abyteand wraps it on load.
-
SHORT
public static final InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper SHORT
Stores aShortas ashortand wraps it on load.
-
CHARACTER
public static final InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper CHARACTER
Stores aCharacteras acharand wraps it on load.
-
INTEGER
public static final InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper INTEGER
Stores aIntegeras aintand wraps it on load.
-
LONG
public static final InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper LONG
Stores aLongas alongand wraps it on load.
-
FLOAT
public static final InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper FLOAT
Stores aFloatas afloatand wraps it on load.
-
DOUBLE
public static final InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper DOUBLE
Stores aDoubleas adoubleand wraps it on load.
-
-
Field Detail
-
primitiveType
private final TypeDescription primitiveType
The primitive type that can be stored on the constant pool.
-
wrapperType
private final TypeDescription wrapperType
The wrapper type that is to be represented.
-
-
Constructor Detail
-
ConstantPoolWrapper
private ConstantPoolWrapper(java.lang.Class<?> primitiveType, java.lang.Class<?> wrapperType)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 Detail
-
values
public static InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper c : InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
of
public static InvokeDynamic.InvocationProvider.ArgumentProvider of(java.lang.Object value)
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
protected abstract InvokeDynamic.InvocationProvider.ArgumentProvider make(java.lang.Object value)
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.
-
-