Package net.bytebuddy.implementation
Enum Class HashCodeMethod.ValueTransformer
java.lang.Object
java.lang.Enum<HashCodeMethod.ValueTransformer>
net.bytebuddy.implementation.HashCodeMethod.ValueTransformer
- All Implemented Interfaces:
Serializable,Comparable<HashCodeMethod.ValueTransformer>,Constable,StackManipulation
- Enclosing class:
HashCodeMethod
protected static enum HashCodeMethod.ValueTransformer
extends Enum<HashCodeMethod.ValueTransformer>
implements StackManipulation
A value transformer that is responsible for resolving a field value to an
int value.-
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 transformer for aboolean[]value.A transformer for abyte[]value.A transformer for achar[]value.A transformer for adoublevalue.A transformer for adouble[]value.A transformer for afloatvalue.A transformer for afloat[]value.A transformer for anint[]value.A transformer for alongvalue.A transformer for along[]value.A transformer for a nested reference array value.A transformer for a reference array value.A transformer for ashort[]value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValid()Determines if this stack manipulation is valid.static StackManipulationof(TypeDefinition typeDefinition) Resolves a type definition to a hash code.Returns the enum constant of this class with the specified name.static HashCodeMethod.ValueTransformer[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
apply
-
Enum Constant Details
-
LONG
A transformer for alongvalue. -
FLOAT
A transformer for afloatvalue. -
DOUBLE
A transformer for adoublevalue. -
BOOLEAN_ARRAY
A transformer for aboolean[]value. -
BYTE_ARRAY
A transformer for abyte[]value. -
SHORT_ARRAY
A transformer for ashort[]value. -
CHARACTER_ARRAY
A transformer for achar[]value. -
INTEGER_ARRAY
A transformer for anint[]value. -
LONG_ARRAY
A transformer for along[]value. -
FLOAT_ARRAY
A transformer for afloat[]value. -
DOUBLE_ARRAY
A transformer for adouble[]value. -
REFERENCE_ARRAY
A transformer for a reference array value. -
NESTED_ARRAY
A transformer for a nested reference array value.
-
-
Constructor Details
-
ValueTransformer
private ValueTransformer()
-
-
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
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
Resolves a type definition to a hash code.- Parameters:
typeDefinition- The type definition to resolve.- Returns:
- The stack manipulation to apply.
-
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.
-