Enum HashCodeMethod.ValueTransformer
java.lang.Object
java.lang.Enum<HashCodeMethod.ValueTransformer>
net.bytebuddy.implementation.HashCodeMethod.ValueTransformer
- All Implemented Interfaces:
Serializable, Comparable<HashCodeMethod.ValueTransformer>, java.lang.constant.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 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 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 computing the identity hash code for a reference.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 type with the specified name.static HashCodeMethod.ValueTransformer[]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
-
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. -
REFERENCE_IDENTITY
A transformer for computing the identity hash code for a reference.
-
-
Constructor Details
-
ValueTransformer
private ValueTransformer()
-
-
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 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.
-