Class TypePool.AbstractBase.Hierarchical
java.lang.Object
net.bytebuddy.pool.TypePool.AbstractBase
net.bytebuddy.pool.TypePool.AbstractBase.Hierarchical
- All Implemented Interfaces:
TypePool
- Direct Known Subclasses:
TypePool.ClassLoading, TypePool.Default, TypePool.Explicit
- Enclosing class:
TypePool.AbstractBase
@Enhance
public abstract static class TypePool.AbstractBase.Hierarchical
extends TypePool.AbstractBase
Implements a hierarchical view of type pools, similarly to class loader hierarchies. For every lookup, the parent type pool
is asked first if it can resolve a type. Only if the parent (and potentially its parents) are unable to resolve a type,
this instance is queried for a type description.
-
Nested Class Summary
Nested classes/interfaces inherited from class TypePool.AbstractBase
TypePool.AbstractBase.ArrayTypeResolution, TypePool.AbstractBase.ComponentTypeReference, TypePool.AbstractBase.HierarchicalNested classes/interfaces inherited from interface TypePool
TypePool.AbstractBase, TypePool.CacheProvider, TypePool.ClassLoading, TypePool.Default, TypePool.Empty, TypePool.Explicit, TypePool.LazyFacade, TypePool.Resolution -
Field Summary
FieldsFields inherited from class TypePool.AbstractBase
cacheProvider, PRIMITIVE_DESCRIPTORS, PRIMITIVE_TYPES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHierarchical(TypePool.CacheProvider cacheProvider, TypePool parent) Creates a hierarchical type pool. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears this type pool's cache.Locates and describes the given type by its name.Methods inherited from class TypePool.AbstractBase
doCache, doDescribe
-
Field Details
-
parent
The parent type pool.
-
-
Constructor Details
-
Hierarchical
Creates a hierarchical type pool.- Parameters:
cacheProvider- The cache provider to be used.parent- The parent type pool to be used.
-
-
Method Details
-
describe
Locates and describes the given type by its name.- Specified by:
describein interfaceTypePool- Overrides:
describein classTypePool.AbstractBase- Parameters:
name- The name of the type to describe. The name is to be written as when callingClass.getName().- Returns:
- A resolution of the type to describe. If the type to be described was found, the returned
TypePool.Resolutionrepresents this type. Otherwise, an illegal resolution is returned.
-
clear
public void clear()Clears this type pool's cache.- Specified by:
clearin interfaceTypePool- Overrides:
clearin classTypePool.AbstractBase
-