Package net.bytebuddy.implementation
Enum HashCodeMethod.ValueTransformer
- java.lang.Object
-
- java.lang.Enum<HashCodeMethod.ValueTransformer>
-
- net.bytebuddy.implementation.HashCodeMethod.ValueTransformer
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<HashCodeMethod.ValueTransformer>,StackManipulation
- Enclosing class:
- HashCodeMethod
protected static enum HashCodeMethod.ValueTransformer extends java.lang.Enum<HashCodeMethod.ValueTransformer> implements StackManipulation
A value transformer that is responsible for resolving a field value to anintvalue.
-
-
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 BOOLEAN_ARRAYA transformer for aboolean[]value.BYTE_ARRAYA transformer for abyte[]value.CHARACTER_ARRAYA transformer for achar[]value.DOUBLEA transformer for adoublevalue.DOUBLE_ARRAYA transformer for adouble[]value.FLOATA transformer for afloatvalue.FLOAT_ARRAYA transformer for afloat[]value.INTEGER_ARRAYA transformer for anint[]value.LONGA transformer for alongvalue.LONG_ARRAYA transformer for along[]value.NESTED_ARRAYA transformer for a nested reference array value.REFERENCE_ARRAYA transformer for a reference array value.SHORT_ARRAYA transformer for ashort[]value.
-
Constructor Summary
Constructors Modifier Constructor Description privateValueTransformer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisValid()Determines if this stack manipulation is valid.static StackManipulationof(TypeDefinition typeDefinition)Resolves a type definition to a hash code.static HashCodeMethod.ValueTransformervalueOf(java.lang.String name)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 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
-
LONG
public static final HashCodeMethod.ValueTransformer LONG
A transformer for alongvalue.
-
FLOAT
public static final HashCodeMethod.ValueTransformer FLOAT
A transformer for afloatvalue.
-
DOUBLE
public static final HashCodeMethod.ValueTransformer DOUBLE
A transformer for adoublevalue.
-
BOOLEAN_ARRAY
public static final HashCodeMethod.ValueTransformer BOOLEAN_ARRAY
A transformer for aboolean[]value.
-
BYTE_ARRAY
public static final HashCodeMethod.ValueTransformer BYTE_ARRAY
A transformer for abyte[]value.
-
SHORT_ARRAY
public static final HashCodeMethod.ValueTransformer SHORT_ARRAY
A transformer for ashort[]value.
-
CHARACTER_ARRAY
public static final HashCodeMethod.ValueTransformer CHARACTER_ARRAY
A transformer for achar[]value.
-
INTEGER_ARRAY
public static final HashCodeMethod.ValueTransformer INTEGER_ARRAY
A transformer for anint[]value.
-
LONG_ARRAY
public static final HashCodeMethod.ValueTransformer LONG_ARRAY
A transformer for along[]value.
-
FLOAT_ARRAY
public static final HashCodeMethod.ValueTransformer FLOAT_ARRAY
A transformer for afloat[]value.
-
DOUBLE_ARRAY
public static final HashCodeMethod.ValueTransformer DOUBLE_ARRAY
A transformer for adouble[]value.
-
REFERENCE_ARRAY
public static final HashCodeMethod.ValueTransformer REFERENCE_ARRAY
A transformer for a reference array value.
-
NESTED_ARRAY
public static final HashCodeMethod.ValueTransformer NESTED_ARRAY
A transformer for a nested reference array value.
-
-
Method Detail
-
values
public static HashCodeMethod.ValueTransformer[] 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 (HashCodeMethod.ValueTransformer c : HashCodeMethod.ValueTransformer.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HashCodeMethod.ValueTransformer 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
public static StackManipulation of(TypeDefinition typeDefinition)
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.
-
-