@HashCodeAndEqualsPlugin.Enhance public static class TypePool.Default extends TypePool.AbstractBase.Hierarchical
A default implementation of a TypePool
that models binary data in the Java byte code format
into a TypeDescription
. The data lookup is delegated to a ClassFileLocator
.
TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution
s that are produced by this type pool are either fully resolved or not resolved at all.
Modifier and Type | Class and Description |
---|---|
protected static interface |
TypePool.Default.AnnotationRegistrant
An annotation registrant implements a visitor pattern for reading an unknown amount of values of annotations.
|
protected static interface |
TypePool.Default.ComponentTypeLocator
A component type locator allows for the lazy location of an array's component type.
|
protected static class |
TypePool.Default.GenericTypeExtractor
A generic type extractor allows for an iterative extraction of generic type information.
|
protected static interface |
TypePool.Default.GenericTypeRegistrant
A type registrant allows to register a generic type token.
|
protected static class |
TypePool.Default.LazyTypeDescription
A type description that looks up any referenced
ByteCodeElement or
AnnotationDescription by querying a type pool at lookup time. |
protected static class |
TypePool.Default.ParameterBag
A bag for collecting parameter meta information that is stored as debug information for implemented
methods.
|
static class |
TypePool.Default.ReaderMode
Determines the granularity of the class file parsing that is conducted by a
TypePool.Default . |
protected class |
TypePool.Default.TypeExtractor
A type extractor reads a class file and collects data that is relevant to create a type description.
|
static class |
TypePool.Default.WithLazyResolution
A variant of
TypePool.Default that resolves type descriptions lazily. |
TypePool.AbstractBase.ArrayTypeResolution, TypePool.AbstractBase.Hierarchical, TypePool.AbstractBase.RawAnnotationValue, TypePool.AbstractBase.RawDescriptionArray, TypePool.AbstractBase.RawEnumerationValue, TypePool.AbstractBase.RawTypeValue
TypePool.AbstractBase, TypePool.CacheProvider, TypePool.ClassLoading, TypePool.Default, TypePool.Empty, TypePool.Explicit, TypePool.LazyFacade, TypePool.Resolution
Modifier and Type | Field and Description |
---|---|
protected ClassFileLocator |
classFileLocator
The locator to query for finding binary data of a type.
|
protected TypePool.Default.ReaderMode |
readerMode
The reader mode to apply by this default type pool.
|
cacheProvider, PRIMITIVE_DESCRIPTORS, PRIMITIVE_TYPES
Constructor and Description |
---|
Default(TypePool.CacheProvider cacheProvider,
ClassFileLocator classFileLocator,
TypePool.Default.ReaderMode readerMode)
Creates a new default type pool without a parent pool.
|
Default(TypePool.CacheProvider cacheProvider,
ClassFileLocator classFileLocator,
TypePool.Default.ReaderMode readerMode,
TypePool parentPool)
Creates a new default type pool.
|
Modifier and Type | Method and Description |
---|---|
protected TypePool.Resolution |
doDescribe(String name)
Determines a resolution to a non-primitive, non-array type.
|
static TypePool |
of(ClassFileLocator classFileLocator)
Creates a default
TypePool that looks up data by querying the supplied class
file locator. |
static TypePool |
of(ClassLoader classLoader)
Returns a type pool for the provided class loader.
|
static TypePool |
ofClassPath()
Creates a default
TypePool that looks up data by querying the system class
loader. |
clear, describe
doCache
protected final ClassFileLocator classFileLocator
protected final TypePool.Default.ReaderMode readerMode
public Default(TypePool.CacheProvider cacheProvider, ClassFileLocator classFileLocator, TypePool.Default.ReaderMode readerMode)
cacheProvider
- The cache provider to be used.classFileLocator
- The class file locator to be used.readerMode
- The reader mode to apply by this default type pool.public Default(TypePool.CacheProvider cacheProvider, ClassFileLocator classFileLocator, TypePool.Default.ReaderMode readerMode, TypePool parentPool)
cacheProvider
- The cache provider to be used.classFileLocator
- The class file locator to be used.readerMode
- The reader mode to apply by this default type pool.parentPool
- The parent type pool.public static TypePool ofClassPath()
TypePool
that looks up data by querying the system class
loader. The returned instance is configured to use a fast reading mode and a simple cache.public static TypePool of(ClassLoader classLoader)
classLoader
- The class loader for which this class pool is representing types.public static TypePool of(ClassFileLocator classFileLocator)
TypePool
that looks up data by querying the supplied class
file locator. The returned instance is configured to use a fast reading mode and a simple cache.classFileLocator
- The class file locator to use.protected TypePool.Resolution doDescribe(String name)
TypePool.AbstractBase
doDescribe
in class TypePool.AbstractBase
name
- The name of the type to describe.Copyright © 2014–2018. All rights reserved.