Package net.bytebuddy.pool
Enum TypePool.CacheProvider.NoOp
- All Implemented Interfaces:
Serializable
,Comparable<TypePool.CacheProvider.NoOp>
,java.lang.constant.Constable
,TypePool.CacheProvider
- Enclosing interface:
TypePool.CacheProvider
public static enum TypePool.CacheProvider.NoOp
extends Enum<TypePool.CacheProvider.NoOp>
implements TypePool.CacheProvider
A non-operational cache that does not store any type descriptions.
-
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.pool.TypePool.CacheProvider
TypePool.CacheProvider.Discriminating, TypePool.CacheProvider.NoOp, TypePool.CacheProvider.Simple
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields inherited from interface net.bytebuddy.pool.TypePool.CacheProvider
UNRESOLVED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears this cache.Attempts to find a resolution in this cache.register
(String name, TypePool.Resolution resolution) Registers a resolution in this cache.static TypePool.CacheProvider.NoOp
Returns the enum constant of this type with the specified name.static TypePool.CacheProvider.NoOp[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
NoOp
private NoOp()
-
-
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
-
find
Attempts to find a resolution in this cache.- Specified by:
find
in interfaceTypePool.CacheProvider
- Parameters:
name
- The name of the type to describe.- Returns:
- A resolution of the type or
null
if no such resolution can be found in the cache.
-
register
Registers a resolution in this cache. If a resolution to the given name already exists in the cache, it should be discarded.- Specified by:
register
in interfaceTypePool.CacheProvider
- Parameters:
name
- The name of the type that is to be registered.resolution
- The resolution to register.- Returns:
- The oldest version of a resolution that is currently registered in the cache which might be the given resolution or another resolution that was previously registered.
-
clear
public void clear()Clears this cache.- Specified by:
clear
in interfaceTypePool.CacheProvider
-