Package net.bytebuddy.implementation
Enum ToStringMethod.ValueConsumer
- java.lang.Object
-
- java.lang.Enum<ToStringMethod.ValueConsumer>
-
- net.bytebuddy.implementation.ToStringMethod.ValueConsumer
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ToStringMethod.ValueConsumer>,StackManipulation
- Enclosing class:
- ToStringMethod
protected static enum ToStringMethod.ValueConsumer extends java.lang.Enum<ToStringMethod.ValueConsumer> implements StackManipulation
A value consumer that is responsible for adding a field value to the string creatingStringBuilder.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Size, StackManipulation.Trivial
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEANA value consumer for abooleanvalue.BOOLEAN_ARRAYA value consumer for abooleanarray type.BYTE_ARRAYA value consumer for abytearray type.CHARACTERA value consumer for acharvalue.CHARACTER_ARRAYA value consumer for achararray type.CHARACTER_SEQUENCEA value consumer for aCharSequencevalue.DOUBLEA value consumer for adoublevalue.DOUBLE_ARRAYA value consumer for adoublearray type.FLOATA value consumer for afloatvalue.FLOAT_ARRAYA value consumer for afloatarray type.INTEGERA value consumer for anintvalue.INTEGER_ARRAYA value consumer for anintarray type.LONGA value consumer for alongvalue.LONG_ARRAYA value consumer for alongarray type.NESTED_ARRAYA value consumer for a nested array type.OBJECTA value consumer for a reference type.REFERENCE_ARRAYA value consumer for a reference array type.SHORT_ARRAYA value consumer for ashortarray type.STRINGA value consumer for aStringvalue.
-
Constructor Summary
Constructors Modifier Constructor Description privateValueConsumer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisValid()Determines if this stack manipulation is valid.protected static StackManipulationof(TypeDescription typeDescription)Resolves an appropriate value resolver for a given type.static ToStringMethod.ValueConsumervalueOf(java.lang.String name)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, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
apply
-
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final ToStringMethod.ValueConsumer BOOLEAN
A value consumer for abooleanvalue.
-
CHARACTER
public static final ToStringMethod.ValueConsumer CHARACTER
A value consumer for acharvalue.
-
INTEGER
public static final ToStringMethod.ValueConsumer INTEGER
A value consumer for anintvalue.
-
LONG
public static final ToStringMethod.ValueConsumer LONG
A value consumer for alongvalue.
-
FLOAT
public static final ToStringMethod.ValueConsumer FLOAT
A value consumer for afloatvalue.
-
DOUBLE
public static final ToStringMethod.ValueConsumer DOUBLE
A value consumer for adoublevalue.
-
STRING
public static final ToStringMethod.ValueConsumer STRING
A value consumer for aStringvalue.
-
CHARACTER_SEQUENCE
public static final ToStringMethod.ValueConsumer CHARACTER_SEQUENCE
A value consumer for aCharSequencevalue.
-
OBJECT
public static final ToStringMethod.ValueConsumer OBJECT
A value consumer for a reference type.
-
BOOLEAN_ARRAY
public static final ToStringMethod.ValueConsumer BOOLEAN_ARRAY
A value consumer for abooleanarray type.
-
BYTE_ARRAY
public static final ToStringMethod.ValueConsumer BYTE_ARRAY
A value consumer for abytearray type.
-
SHORT_ARRAY
public static final ToStringMethod.ValueConsumer SHORT_ARRAY
A value consumer for ashortarray type.
-
CHARACTER_ARRAY
public static final ToStringMethod.ValueConsumer CHARACTER_ARRAY
A value consumer for achararray type.
-
INTEGER_ARRAY
public static final ToStringMethod.ValueConsumer INTEGER_ARRAY
A value consumer for anintarray type.
-
LONG_ARRAY
public static final ToStringMethod.ValueConsumer LONG_ARRAY
A value consumer for alongarray type.
-
FLOAT_ARRAY
public static final ToStringMethod.ValueConsumer FLOAT_ARRAY
A value consumer for afloatarray type.
-
DOUBLE_ARRAY
public static final ToStringMethod.ValueConsumer DOUBLE_ARRAY
A value consumer for adoublearray type.
-
REFERENCE_ARRAY
public static final ToStringMethod.ValueConsumer REFERENCE_ARRAY
A value consumer for a reference array type.
-
NESTED_ARRAY
public static final ToStringMethod.ValueConsumer NESTED_ARRAY
A value consumer for a nested array type.
-
-
Method Detail
-
values
public static ToStringMethod.ValueConsumer[] 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 (ToStringMethod.ValueConsumer c : ToStringMethod.ValueConsumer.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ToStringMethod.ValueConsumer 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
protected static StackManipulation of(TypeDescription typeDescription)
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.
-
-