Package net.bytebuddy
Enum TypeCache.Sort
- All Implemented Interfaces:
Serializable
,Comparable<TypeCache.Sort>
,java.lang.constant.Constable
Determines the storage format for a cached type.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCreates a cache where cached types are wrapped bySoftReference
s.Creates a cache where cached types are strongly referenced.Creates a cache where cached types are wrapped byWeakReference
s. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeCache.Sort
Returns the enum constant of this type with the specified name.static TypeCache.Sort[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.protected abstract Object
Wraps a type as aReference
.
-
Enum Constant Details
-
WEAK
Creates a cache where cached types are wrapped byWeakReference
s. -
SOFT
Creates a cache where cached types are wrapped bySoftReference
s. -
STRONG
Creates a cache where cached types are strongly referenced.
-
-
Constructor Details
-
Sort
private Sort()
-
-
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
-
wrap
Wraps a type as aReference
.- Parameters:
type
- The type to wrap.- Returns:
- The reference that represents the type.
-