Package net.bytebuddy.implementation
Enum EqualsMethod.TypePropertyComparator
- java.lang.Object
-
- java.lang.Enum<EqualsMethod.TypePropertyComparator>
-
- net.bytebuddy.implementation.EqualsMethod.TypePropertyComparator
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EqualsMethod.TypePropertyComparator>
,java.util.Comparator<FieldDescription.InDefinedShape>
- Enclosing class:
- EqualsMethod
protected static enum EqualsMethod.TypePropertyComparator extends java.lang.Enum<EqualsMethod.TypePropertyComparator> implements java.util.Comparator<FieldDescription.InDefinedShape>
A comparator that sorts fields by a type property.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FOR_ENUMERATION_TYPES
Weights enumeration types before non-enumeration types.FOR_PRIMITIVE_TYPES
Weights primitive types before non-primitive types.FOR_PRIMITIVE_WRAPPER_TYPES
Weights primitive wrapper types first.FOR_STRING_TYPES
WeightsString
types first.
-
Constructor Summary
Constructors Modifier Constructor Description private
TypePropertyComparator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
compare(FieldDescription.InDefinedShape left, FieldDescription.InDefinedShape right)
protected abstract boolean
resolve(TypeDefinition typeDefinition)
Resolves a type property.static EqualsMethod.TypePropertyComparator
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EqualsMethod.TypePropertyComparator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FOR_PRIMITIVE_TYPES
public static final EqualsMethod.TypePropertyComparator FOR_PRIMITIVE_TYPES
Weights primitive types before non-primitive types.
-
FOR_ENUMERATION_TYPES
public static final EqualsMethod.TypePropertyComparator FOR_ENUMERATION_TYPES
Weights enumeration types before non-enumeration types.
-
FOR_STRING_TYPES
public static final EqualsMethod.TypePropertyComparator FOR_STRING_TYPES
WeightsString
types first.
-
FOR_PRIMITIVE_WRAPPER_TYPES
public static final EqualsMethod.TypePropertyComparator FOR_PRIMITIVE_WRAPPER_TYPES
Weights primitive wrapper types first.
-
-
Method Detail
-
values
public static EqualsMethod.TypePropertyComparator[] 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 (EqualsMethod.TypePropertyComparator c : EqualsMethod.TypePropertyComparator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EqualsMethod.TypePropertyComparator 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
-
compare
public int compare(FieldDescription.InDefinedShape left, FieldDescription.InDefinedShape right)
- Specified by:
compare
in interfacejava.util.Comparator<FieldDescription.InDefinedShape>
-
resolve
protected abstract boolean resolve(TypeDefinition typeDefinition)
Resolves a type property.- Parameters:
typeDefinition
- The type to resolve the property for.- Returns:
true
if the type property is resolved.
-
-