Package net.bytebuddy.implementation
Enum ToStringMethod.ValueConsumer
java.lang.Object
java.lang.Enum<ToStringMethod.ValueConsumer>
net.bytebuddy.implementation.ToStringMethod.ValueConsumer
- All Implemented Interfaces:
Serializable
,Comparable<ToStringMethod.ValueConsumer>
,java.lang.constant.Constable
,StackManipulation
- Enclosing class:
ToStringMethod
protected static enum ToStringMethod.ValueConsumer
extends Enum<ToStringMethod.ValueConsumer>
implements StackManipulation
A value consumer that is responsible for adding a field value to the string creating
StringBuilder
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA value consumer for aboolean
value.A value consumer for aboolean
array type.A value consumer for abyte
array type.A value consumer for achar
value.A value consumer for achar
array type.A value consumer for aCharSequence
value.A value consumer for adouble
value.A value consumer for adouble
array type.A value consumer for afloat
value.A value consumer for afloat
array type.A value consumer for anint
value.A value consumer for anint
array type.A value consumer for along
value.A value consumer for along
array type.A value consumer for a nested array type.A value consumer for a reference type.A value consumer for a reference array type.A value consumer for ashort
array type.A value consumer for aString
value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isValid()
Determines if this stack manipulation is valid.protected static StackManipulation
of
(TypeDescription typeDescription) Resolves an appropriate value resolver for a given type.static ToStringMethod.ValueConsumer
Returns the enum constant of this type with the specified name.static ToStringMethod.ValueConsumer[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
apply
-
Enum Constant Details
-
BOOLEAN
A value consumer for aboolean
value. -
CHARACTER
A value consumer for achar
value. -
INTEGER
A value consumer for anint
value. -
LONG
A value consumer for along
value. -
FLOAT
A value consumer for afloat
value. -
DOUBLE
A value consumer for adouble
value. -
STRING
A value consumer for aString
value. -
CHARACTER_SEQUENCE
A value consumer for aCharSequence
value. -
OBJECT
A value consumer for a reference type. -
BOOLEAN_ARRAY
A value consumer for aboolean
array type. -
BYTE_ARRAY
A value consumer for abyte
array type. -
SHORT_ARRAY
A value consumer for ashort
array type. -
CHARACTER_ARRAY
A value consumer for achar
array type. -
INTEGER_ARRAY
A value consumer for anint
array type. -
LONG_ARRAY
A value consumer for along
array type. -
FLOAT_ARRAY
A value consumer for afloat
array type. -
DOUBLE_ARRAY
A value consumer for adouble
array type. -
REFERENCE_ARRAY
A value consumer for a reference array type. -
NESTED_ARRAY
A value consumer for a nested array type.
-
-
Constructor Details
-
ValueConsumer
private ValueConsumer()
-
-
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 an appropriate value resolver for a given type.- Parameters:
typeDescription
- The type for which to resolve a value resolver.- Returns:
- An appropriate stack manipulation.
-
isValid
public boolean isValid()Determines if this stack manipulation is valid.- Specified by:
isValid
in interfaceStackManipulation
- Returns:
- If
false
, this manipulation cannot be applied and should throw an exception.
-