Package net.bytebuddy.pool
Class TypePool.ClassLoading
- java.lang.Object
-
- net.bytebuddy.pool.TypePool.AbstractBase
-
- net.bytebuddy.pool.TypePool.AbstractBase.Hierarchical
-
- net.bytebuddy.pool.TypePool.ClassLoading
-
- All Implemented Interfaces:
TypePool
- Enclosing interface:
- TypePool
@Enhance public static class TypePool.ClassLoading extends TypePool.AbstractBase.Hierarchical
A type pool that attempts to load a class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.pool.TypePool.AbstractBase
TypePool.AbstractBase.ArrayTypeResolution, TypePool.AbstractBase.ComponentTypeReference, TypePool.AbstractBase.Hierarchical
-
Nested classes/interfaces inherited from interface net.bytebuddy.pool.TypePool
TypePool.AbstractBase, TypePool.CacheProvider, TypePool.ClassLoading, TypePool.Default, TypePool.Empty, TypePool.Explicit, TypePool.LazyFacade, TypePool.Resolution
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.ClassLoader
BOOTSTRAP_CLASS_LOADER
Type-safe representation of the bootstrap class loader which isnull
.private java.lang.ClassLoader
classLoader
The class loader to query.-
Fields inherited from class net.bytebuddy.pool.TypePool.AbstractBase
cacheProvider, PRIMITIVE_DESCRIPTORS, PRIMITIVE_TYPES
-
-
Constructor Summary
Constructors Constructor Description ClassLoading(TypePool.CacheProvider cacheProvider, TypePool parent, java.lang.ClassLoader classLoader)
Creates a class loadings type pool.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TypePool.Resolution
doDescribe(java.lang.String name)
Determines a resolution to a non-primitive, non-array type.static TypePool
of(java.lang.ClassLoader classLoader)
Returns a type pool that attempts type descriptions by loadings types from the given class loader.static TypePool
of(java.lang.ClassLoader classLoader, TypePool parent)
Returns a type pool that attempts type descriptions by loadings types from the given class loader.static TypePool
ofBootLoader()
Returns a type pool that attempts type descriptions by loadings types from the bootstrap class loader.static TypePool
ofPlatformLoader()
Returns a type pool that attempts type descriptions by loadings types from the platform class loader.static TypePool
ofSystemLoader()
Returns a type pool that attempts type descriptions by loadings types from the system class loader.-
Methods inherited from class net.bytebuddy.pool.TypePool.AbstractBase.Hierarchical
clear, describe
-
Methods inherited from class net.bytebuddy.pool.TypePool.AbstractBase
doCache
-
-
-
-
Constructor Detail
-
ClassLoading
public ClassLoading(TypePool.CacheProvider cacheProvider, TypePool parent, java.lang.ClassLoader classLoader)
Creates a class loadings type pool.- Parameters:
cacheProvider
- The cache provider to use.parent
- The parent type pool.classLoader
- The class loader to use for locating files.
-
-
Method Detail
-
of
public static TypePool of(java.lang.ClassLoader classLoader)
Returns a type pool that attempts type descriptions by loadings types from the given class loader.- Parameters:
classLoader
- The class loader to use.- Returns:
- An class loading type pool.
-
of
public static TypePool of(java.lang.ClassLoader classLoader, TypePool parent)
Returns a type pool that attempts type descriptions by loadings types from the given class loader.- Parameters:
classLoader
- The class loader to use.parent
- The parent type pool to use.- Returns:
- An class loading type pool.
-
ofSystemLoader
public static TypePool ofSystemLoader()
Returns a type pool that attempts type descriptions by loadings types from the system class loader.- Returns:
- An class loading type pool for the system class loader.
-
ofPlatformLoader
public static TypePool ofPlatformLoader()
Returns a type pool that attempts type descriptions by loadings types from the platform class loader. If the current VM is Java 8 or older, the extension class loader is represented instead.- Returns:
- An class loading type pool for the system class loader.
-
ofBootLoader
public static TypePool ofBootLoader()
Returns a type pool that attempts type descriptions by loadings types from the bootstrap class loader.- Returns:
- An class loading type pool for the bootstrap class loader.
-
doDescribe
protected TypePool.Resolution doDescribe(java.lang.String name)
Description copied from class:TypePool.AbstractBase
Determines a resolution to a non-primitive, non-array type.- Specified by:
doDescribe
in classTypePool.AbstractBase
- Parameters:
name
- The name of the type to describe.- Returns:
- A resolution to the type to describe.
-
-