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 Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface StackManipulation
StackManipulation.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA value consumer for abooleanvalue.A value consumer for abooleanarray type.A value consumer for abytearray type.A value consumer for acharvalue.A value consumer for achararray type.A value consumer for aCharSequencevalue.A value consumer for adoublevalue.A value consumer for adoublearray type.A value consumer for afloatvalue.A value consumer for afloatarray type.A value consumer for anintvalue.A value consumer for anintarray type.A value consumer for alongvalue.A value consumer for alongarray 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 ashortarray type.A value consumer for aStringvalue. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValid()Determines if this stack manipulation is valid.protected static StackManipulationof(TypeDescription typeDescription) Resolves an appropriate value resolver for a given type.static ToStringMethod.ValueConsumerReturns 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 Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface StackManipulation
apply
-
Enum Constant Details
-
BOOLEAN
A value consumer for abooleanvalue. -
CHARACTER
A value consumer for acharvalue. -
INTEGER
A value consumer for anintvalue. -
LONG
A value consumer for alongvalue. -
FLOAT
A value consumer for afloatvalue. -
DOUBLE
A value consumer for adoublevalue. -
STRING
A value consumer for aStringvalue. -
CHARACTER_SEQUENCE
A value consumer for aCharSequencevalue. -
OBJECT
A value consumer for a reference type. -
BOOLEAN_ARRAY
A value consumer for abooleanarray type. -
BYTE_ARRAY
A value consumer for abytearray type. -
SHORT_ARRAY
A value consumer for ashortarray type. -
CHARACTER_ARRAY
A value consumer for achararray type. -
INTEGER_ARRAY
A value consumer for anintarray type. -
LONG_ARRAY
A value consumer for alongarray type. -
FLOAT_ARRAY
A value consumer for afloatarray type. -
DOUBLE_ARRAY
A value consumer for adoublearray 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:
isValidin interfaceStackManipulation- Returns:
- If
false, this manipulation cannot be applied and should throw an exception.
-