Package net.bytebuddy.pool
Enum TypePool.CacheProvider.NoOp
- java.lang.Object
-
- java.lang.Enum<TypePool.CacheProvider.NoOp>
-
- net.bytebuddy.pool.TypePool.CacheProvider.NoOp
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TypePool.CacheProvider.NoOp>
,TypePool.CacheProvider
- Enclosing interface:
- TypePool.CacheProvider
public static enum TypePool.CacheProvider.NoOp extends java.lang.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 interface net.bytebuddy.pool.TypePool.CacheProvider
TypePool.CacheProvider.Discriminating, TypePool.CacheProvider.NoOp, TypePool.CacheProvider.Simple
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Field Summary
-
Fields inherited from interface net.bytebuddy.pool.TypePool.CacheProvider
UNRESOLVED
-
-
Constructor Summary
Constructors Modifier Constructor Description private
NoOp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears this cache.TypePool.Resolution
find(java.lang.String name)
Attempts to find a resolution in this cache.TypePool.Resolution
register(java.lang.String name, TypePool.Resolution resolution)
Registers a resolution in this cache.static TypePool.CacheProvider.NoOp
valueOf(java.lang.String name)
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 Detail
-
INSTANCE
public static final TypePool.CacheProvider.NoOp INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static TypePool.CacheProvider.NoOp[] 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 (TypePool.CacheProvider.NoOp c : TypePool.CacheProvider.NoOp.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypePool.CacheProvider.NoOp 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
-
find
public TypePool.Resolution find(java.lang.String name)
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
public TypePool.Resolution register(java.lang.String name, TypePool.Resolution resolution)
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
-
-