| Package | Description |
|---|---|
| net.bytebuddy |
Byte Buddy is a library for creating Java classes at runtime of a Java program.
|
| net.bytebuddy.agent.builder |
An agent builder is used to easily implement load-time class-transformations using a Java agent.
|
| net.bytebuddy.dynamic |
This package contains classes and interfaces that are connected to writing the byte stream that represents a Java
type that is dynamically created and for loading this type into a running JVM process.
|
| net.bytebuddy.dynamic.loading |
This package contains classes that are responsible for class loading of classes that are represented by
byte arrays. |
| net.bytebuddy.dynamic.scaffold |
This package contains helper types and implementations that are responsible for the actual writing of a byte array
representing a Java class.
|
| net.bytebuddy.dynamic.scaffold.inline |
All classes and types in this package are related to creating a
DynamicType by
enhancing a given type. |
| net.bytebuddy.dynamic.scaffold.subclass |
All classes and types in this package are related to creating a
DynamicType by
creating a subclass of a given type. |
| net.bytebuddy.instrumentation |
The instrumentation package contains any logic for intercepting method calls.
|
| net.bytebuddy.instrumentation.attribute |
All types and classes in this package are responsible for writing attributes for a given Java byte code element,
i.e.
|
| net.bytebuddy.instrumentation.attribute.annotation |
Types and classes in this package are responsible for writing Java annotations to a Java type, field or byte code
method.
|
| net.bytebuddy.instrumentation.field |
This package contains types and implementations for describing a Java field.
|
| net.bytebuddy.instrumentation.method |
This package contains types and implementations for describing a Java byte code method which can be any byte code
container, i.e.
|
| net.bytebuddy.instrumentation.method.bytecode.bind |
The types and classes of this package are responsible for binding a method call to calling another method.
|
| net.bytebuddy.instrumentation.method.bytecode.bind.annotation |
This package contains annotations, types and classes that are responsible for binding a method to calling another
method by interpreting annotations that indicate how a method should be bound to another method.
|
| net.bytebuddy.instrumentation.method.bytecode.stack |
This package offers an abstraction of creating Java byte code by only manipulating a method's operand stack.
|
| net.bytebuddy.instrumentation.method.bytecode.stack.assign |
An
Assigner is responsible for transforming
a given TypeDescription into another one. |
| net.bytebuddy.instrumentation.method.bytecode.stack.assign.primitive |
Assigner implementations of this package
are capable of handling primitive types or the void type. |
| net.bytebuddy.instrumentation.method.bytecode.stack.assign.reference |
Assigner implementations of this package
are capable of assigning non-primitive types to each other. |
| net.bytebuddy.instrumentation.method.bytecode.stack.collection |
This package is dedicated to creating
StackManipulations
that create collections or arrays from a given number of values. |
| net.bytebuddy.instrumentation.method.bytecode.stack.constant |
StackManipulations in this package are responsible for
creating compile-time constants and pushing them onto the operand stack. |
| net.bytebuddy.instrumentation.method.bytecode.stack.member |
StackManipulations of this package are responsible for
accessing type or method members, i.e. |
| net.bytebuddy.instrumentation.type |
This package contains types and implementations for describing a Java type, i.e.
|
| net.bytebuddy.instrumentation.type.auxiliary |
Auxiliary types describe helper types that aid as a supplementary to a given
InstrumentedType. |
| net.bytebuddy.matcher |
Contains an API for matching Java byte code entities.
|
| net.bytebuddy.pool |
Classes of this package allow for the creating
TypeDescriptions without
loading any classes. |
| net.bytebuddy.utility |
This package contains utility classes for common use within any Byte Buddy logic.
|
| Modifier and Type | Field and Description |
|---|---|
protected List<TypeDescription> |
ByteBuddy.interfaceTypes
A list of interface types to be implemented by any class that is implemented by the current configuration.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
NamingStrategy.UnnamedType.getSuperClass()
Returns this unnamed type's super class.
|
TypeDescription |
NamingStrategy.UnnamedType.Default.getSuperClass() |
| Modifier and Type | Method and Description |
|---|---|
Collection<TypeDescription> |
NamingStrategy.UnnamedType.getDeclaredInterfaces()
Returns a collection of descriptions of this unnamed type's directly implemented interfaces.
|
List<TypeDescription> |
NamingStrategy.UnnamedType.Default.getDeclaredInterfaces() |
List<TypeDescription> |
ByteBuddy.getInterfaceTypes()
Returns the naming strategy for the current configuration.
|
List<TypeDescription> |
ByteBuddy.Proxy.getInterfaceTypes() |
| Modifier and Type | Method and Description |
|---|---|
NamingStrategy |
NamingStrategy.Unbound.rebase(TypeDescription typeDescription)
Returns a naming strategy for rebasing a type.
|
NamingStrategy |
NamingStrategy.Unbound.Default.rebase(TypeDescription typeDescription) |
NamingStrategy |
NamingStrategy.Unbound.Unified.rebase(TypeDescription typeDescription) |
<T> DynamicType.Builder<T> |
ByteBuddy.rebase(TypeDescription levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type by weaving any changes into an already defined level type.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.rebase(TypeDescription levelType,
ClassFileLocator classFileLocator) |
<T> DynamicType.Builder<T> |
ByteBuddy.rebase(TypeDescription levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a dynamic type by weaving any changes into an already defined level type.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.rebase(TypeDescription levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) |
NamingStrategy |
NamingStrategy.Unbound.redefine(TypeDescription typeDescription)
Returns a naming strategy for redefining a type.
|
NamingStrategy |
NamingStrategy.Unbound.Default.redefine(TypeDescription typeDescription) |
NamingStrategy |
NamingStrategy.Unbound.Unified.redefine(TypeDescription typeDescription) |
<T> DynamicType.Builder<T> |
ByteBuddy.redefine(TypeDescription levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type builder for redefining of the given type.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.redefine(TypeDescription levelType,
ClassFileLocator classFileLocator) |
NamingStrategy |
NamingStrategy.Unbound.subclass(TypeDescription typeDescription)
Returns a naming strategy for subclassing a type.
|
NamingStrategy |
NamingStrategy.Unbound.Default.subclass(TypeDescription typeDescription) |
NamingStrategy |
NamingStrategy.Unbound.Unified.subclass(TypeDescription typeDescription) |
<T> DynamicType.Builder<T> |
ByteBuddy.subclass(TypeDescription superType)
Creates a dynamic type builder that creates a subclass of a given type description where the subclass
is created by the
ConstructorStrategy.Default.IMITATE_SUPER_TYPE
strategy. |
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.subclass(TypeDescription superType) |
<T> DynamicType.Builder<T> |
ByteBuddy.subclass(TypeDescription superType,
ConstructorStrategy constructorStrategy)
Creates a dynamic type builder that creates a subclass of a given type description.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.subclass(TypeDescription superType,
ConstructorStrategy constructorStrategy) |
ByteBuddy.OptionalMethodInterception |
ByteBuddy.withImplementing(TypeDescription... type)
Defines all dynamic types that are created by this configuration to implement the given interface.
|
ByteBuddy.OptionalMethodInterception |
ByteBuddy.Proxy.withImplementing(TypeDescription... type) |
| Constructor and Description |
|---|
Default(TypeDescription superClass,
List<TypeDescription> interfaces,
int modifiers,
ClassFileVersion classFileVersion)
Creates a new unnamed type.
|
ForGivenType(TypeDescription typeDescription)
Creates a new base name resolver that resolves a using the name of a given type.
|
| Constructor and Description |
|---|
ByteBuddy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new
ByteBuddy configuration. |
Default(TypeDescription superClass,
List<TypeDescription> interfaces,
int modifiers,
ClassFileVersion classFileVersion)
Creates a new unnamed type.
|
MethodAnnotationTarget(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory)
Creates a new method annotation target.
|
OptionalMethodInterception(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher)
Creates a new optional method interception.
|
Proxy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new proxy configuration for
ByteBuddy. |
| Modifier and Type | Method and Description |
|---|---|
StackManipulation |
AgentBuilder.Default.InitializationStrategy.SelfInjection.Nexus.Accessor.initializerFor(TypeDescription instrumentedType)
Creates a stack manipulation for a given instrumented type that injects a code block for
calling the system class loader's nexus in order to apply a self-initialization.
|
boolean |
AgentBuilder.Default.Transformation.matches(TypeDescription typeDescription,
ClassLoader classLoader,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain) |
boolean |
AgentBuilder.RawMatcher.matches(TypeDescription typeDescription,
ClassLoader classLoader,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain)
Decides if the given
typeDescription should be instrumented with the entailed
AgentBuilder.Transformers. |
boolean |
AgentBuilder.RawMatcher.ForElementMatcherPair.matches(TypeDescription typeDescription,
ClassLoader classLoader,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain) |
| Modifier and Type | Method and Description |
|---|---|
AgentBuilder.Identified |
AgentBuilder.rebase(ElementMatcher<? super TypeDescription> typeMatcher)
Matches a type being loaded in order to apply the supplied
AgentBuilder.Transformers before loading this type. |
AgentBuilder.Identified |
AgentBuilder.Default.rebase(ElementMatcher<? super TypeDescription> typeMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.Matched.rebase(ElementMatcher<? super TypeDescription> typeMatcher) |
AgentBuilder.Identified |
AgentBuilder.rebase(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher)
Matches a type being loaded in order to apply the supplied
AgentBuilder.Transformers before loading this type. |
AgentBuilder.Identified |
AgentBuilder.Default.rebase(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.Matched.rebase(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher) |
| Constructor and Description |
|---|
ForElementMatcherPair(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher)
Creates a new
AgentBuilder.RawMatcher that only matches the
supplied TypeDescription and its
ClassLoader against two matcher in order to decied if an instrumentation should
be conducted. |
| Modifier and Type | Field and Description |
|---|---|
static TypeDescription |
TargetType.DESCRIPTION
A description representation of the
TargetType. |
protected TypeDescription |
DynamicType.Builder.AbstractBase.FieldToken.fieldType
A description of the field type or a description of the
TargetType placeholder. |
protected TypeDescription |
DynamicType.Builder.AbstractBase.MethodToken.returnType
A description of the return type of the method or a type describing the
TargetType placeholder. |
protected TypeDescription |
DynamicType.Builder.AbstractBase.targetType
The target type description that is specified for this builder.
|
protected TypeDescription |
DynamicType.Default.typeDescription
A type description of this dynamic type.
|
| Modifier and Type | Field and Description |
|---|---|
protected List<TypeDescription> |
DynamicType.Builder.AbstractBase.MethodToken.exceptionTypes
A list of exception type descriptions for the method.
|
protected List<TypeDescription> |
DynamicType.Builder.AbstractBase.interfaceTypes
The interface types to implement as specified for this builder.
|
protected List<TypeDescription> |
DynamicType.Builder.AbstractBase.MethodToken.parameterTypes
A list of parameter type descriptions for the method which might be represented by the
TargetType placeholder. |
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
DynamicType.Builder.AbstractBase.FieldToken.getFieldType()
Returns the type of this field token.
|
TypeDescription |
DynamicType.Builder.AbstractBase.MethodToken.getReturnType()
Returns a description of the return type of this method token.
|
TypeDescription |
DynamicType.getTypeDescription()
Returns a description of this dynamic type.
|
TypeDescription |
DynamicType.Default.getTypeDescription() |
protected TypeDescription |
DynamicType.Builder.AbstractBase.FieldToken.resolveFieldType(TypeDescription instrumentedType)
Resolves the field type which could be represented by the
TargetType placeholder type. |
protected TypeDescription |
DynamicType.Builder.AbstractBase.MethodToken.resolveReturnType(TypeDescription instrumentedType)
Resolves the return type for the method which could be represented by the
TargetType placeholder type. |
| Modifier and Type | Method and Description |
|---|---|
Map<TypeDescription,byte[]> |
DynamicType.getAllTypes()
Returns all types that are implied by this dynamic type.
|
Map<TypeDescription,byte[]> |
DynamicType.Default.getAllTypes() |
List<TypeDescription> |
DynamicType.Builder.AbstractBase.MethodToken.getExceptionTypes()
Returns a list of exception types of this method token.
|
Map<TypeDescription,Class<?>> |
DynamicType.Loaded.getLoadedAuxiliaryTypes()
Returns a map of all loaded auxiliary types to this dynamic type.
|
Map<TypeDescription,Class<?>> |
DynamicType.Default.Loaded.getLoadedAuxiliaryTypes() |
Map<TypeDescription,LoadedTypeInitializer> |
DynamicType.getLoadedTypeInitializers()
Returns a map of all loaded type initializers for the main type and all auxiliary types, if any.
|
Map<TypeDescription,LoadedTypeInitializer> |
DynamicType.Default.getLoadedTypeInitializers() |
List<TypeDescription> |
DynamicType.Builder.AbstractBase.MethodToken.getParameterTypes()
Returns a list of descriptions of the parameter types of this method token.
|
Map<TypeDescription,byte[]> |
DynamicType.getRawAuxiliaryTypes()
Returns a map of all auxiliary types that are required for making use of the main type.
|
Map<TypeDescription,byte[]> |
DynamicType.Default.getRawAuxiliaryTypes() |
Map<TypeDescription,Class<?>> |
ClassLoadingStrategy.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types)
Loads a given collection of classes given their binary representation.
|
Map<TypeDescription,Class<?>> |
ClassLoadingStrategy.Default.ProtectionDomainInjection.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types) |
Map<TypeDescription,Class<?>> |
ClassLoadingStrategy.Default.ProtectionDomainWrapper.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types) |
protected List<TypeDescription> |
DynamicType.Builder.AbstractBase.MethodToken.resolveExceptionTypes(TypeDescription instrumentedType)
Resolves the declared exception types for the method.
|
protected List<TypeDescription> |
DynamicType.Builder.AbstractBase.MethodToken.resolveParameterTypes(TypeDescription instrumentedType)
Resolves the parameter types for the method which could be represented by the
TargetType placeholder type. |
Map<TypeDescription,File> |
DynamicType.saveIn(File folder)
Saves a dynamic type in a given folder using the Java class file format while respecting the naming conventions
for saving compiled Java classes.
|
Map<TypeDescription,File> |
DynamicType.Default.saveIn(File folder) |
| Modifier and Type | Method and Description |
|---|---|
DynamicType.Builder.FieldValueTarget<T> |
DynamicType.Builder.defineField(String name,
TypeDescription fieldTypeDescription,
ModifierContributor.ForField... modifier)
Defines a new field for this type.
|
DynamicType.Builder.FieldValueTarget<S> |
DynamicType.Builder.AbstractBase.defineField(String name,
TypeDescription fieldType,
ModifierContributor.ForField... modifier) |
DynamicType.Builder.FieldValueTarget<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.defineField(String name,
TypeDescription fieldTypeDescription,
ModifierContributor.ForField... modifier) |
DynamicType.Builder.ExceptionDeclarableMethodInterception<T> |
DynamicType.Builder.defineMethod(String name,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
ModifierContributor.ForMethod... modifier)
Defines a new method for this type.
|
DynamicType.Builder.ExceptionDeclarableMethodInterception<S> |
DynamicType.Builder.AbstractBase.defineMethod(String name,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
ModifierContributor.ForMethod... modifier) |
DynamicType.Builder.ExceptionDeclarableMethodInterception<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.defineMethod(String name,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
ModifierContributor.ForMethod... modifier) |
DynamicType.Builder.OptionalMatchedMethodInterception<T> |
DynamicType.Builder.implement(TypeDescription... interfaceType)
Adds an interface to be implemented the created type.
|
DynamicType.Builder.OptionalMatchedMethodInterception<S> |
DynamicType.Builder.AbstractBase.implement(TypeDescription... interfaceType) |
DynamicType.Builder.OptionalMatchedMethodInterception<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.implement(TypeDescription... interfaceType) |
ElementMatcher<? super MethodDescription> |
DynamicType.Builder.AbstractBase.MethodToken.manifest(TypeDescription instrumentedType) |
protected abstract DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription targetType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens)
Creates a new immutable type builder which represents the given arguments.
|
static DynamicType.Builder.FieldValueTarget.NumericRangeValidator |
DynamicType.Builder.FieldValueTarget.NumericRangeValidator.of(TypeDescription typeDescription)
Identifies the correct validator for a given type description.
|
protected List<TypeDescription> |
DynamicType.Builder.AbstractBase.MethodToken.resolveExceptionTypes(TypeDescription instrumentedType)
Resolves the declared exception types for the method.
|
protected TypeDescription |
DynamicType.Builder.AbstractBase.FieldToken.resolveFieldType(TypeDescription instrumentedType)
Resolves the field type which could be represented by the
TargetType placeholder type. |
protected List<TypeDescription> |
DynamicType.Builder.AbstractBase.MethodToken.resolveParameterTypes(TypeDescription instrumentedType)
Resolves the parameter types for the method which could be represented by the
TargetType placeholder type. |
protected TypeDescription |
DynamicType.Builder.AbstractBase.MethodToken.resolveReturnType(TypeDescription instrumentedType)
Resolves the return type for the method which could be represented by the
TargetType placeholder type. |
DynamicType.Builder.MatchedMethodInterception<S> |
DynamicType.Builder.ExceptionDeclarableMethodInterception.throwing(TypeDescription... type)
Defines a number of
Throwable types to be include in the exception declaration. |
DynamicType.Builder.MatchedMethodInterception<S> |
DynamicType.Builder.AbstractBase.DefaultExceptionDeclarableMethodInterception.throwing(TypeDescription... type) |
| Modifier and Type | Method and Description |
|---|---|
DynamicType.Builder.ExceptionDeclarableMethodInterception<T> |
DynamicType.Builder.defineConstructor(List<? extends TypeDescription> parameterTypes,
ModifierContributor.ForMethod... modifier)
Defines a new constructor for this type.
|
DynamicType.Builder.ExceptionDeclarableMethodInterception<S> |
DynamicType.Builder.AbstractBase.defineConstructor(List<? extends TypeDescription> parameterTypes,
ModifierContributor.ForMethod... modifier) |
DynamicType.Builder.ExceptionDeclarableMethodInterception<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.defineConstructor(List<? extends TypeDescription> parameterTypes,
ModifierContributor.ForMethod... modifier) |
DynamicType.Builder.ExceptionDeclarableMethodInterception<T> |
DynamicType.Builder.defineMethod(String name,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
ModifierContributor.ForMethod... modifier)
Defines a new method for this type.
|
DynamicType.Builder.ExceptionDeclarableMethodInterception<S> |
DynamicType.Builder.AbstractBase.defineMethod(String name,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
ModifierContributor.ForMethod... modifier) |
DynamicType.Builder.ExceptionDeclarableMethodInterception<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.defineMethod(String name,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
ModifierContributor.ForMethod... modifier) |
Map<TypeDescription,Class<?>> |
ClassLoadingStrategy.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types)
Loads a given collection of classes given their binary representation.
|
Map<TypeDescription,Class<?>> |
ClassLoadingStrategy.Default.ProtectionDomainInjection.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types) |
Map<TypeDescription,Class<?>> |
ClassLoadingStrategy.Default.ProtectionDomainWrapper.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types) |
protected abstract DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription targetType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens)
Creates a new immutable type builder which represents the given arguments.
|
| Constructor and Description |
|---|
AbstractBase(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription targetType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens)
Creates a new immutable type builder base implementation.
|
Default(TypeDescription typeDescription,
byte[] binaryRepresentation,
LoadedTypeInitializer loadedTypeInitializer,
List<? extends DynamicType> auxiliaryTypes)
Creates a new dynamic type.
|
FieldToken(String name,
TypeDescription fieldType,
int modifiers)
Creates a new field token.
|
Loaded(TypeDescription typeDescription,
byte[] typeByte,
LoadedTypeInitializer loadedTypeInitializer,
List<? extends DynamicType> auxiliaryTypes,
Map<TypeDescription,Class<?>> loadedTypes)
Creates a new representation of a loaded dynamic type.
|
MethodToken(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new method token representing a method to implement for the built dynamic type.
|
Unloaded(TypeDescription typeDescription,
byte[] typeByte,
LoadedTypeInitializer loadedTypeInitializer,
List<? extends DynamicType> auxiliaryTypes)
Creates a new unloaded representation of a dynamic type.
|
| Constructor and Description |
|---|
AbstractBase(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription targetType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens)
Creates a new immutable type builder base implementation.
|
Loaded(TypeDescription typeDescription,
byte[] typeByte,
LoadedTypeInitializer loadedTypeInitializer,
List<? extends DynamicType> auxiliaryTypes,
Map<TypeDescription,Class<?>> loadedTypes)
Creates a new representation of a loaded dynamic type.
|
MethodToken(List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new method token representing a constructor to implement for the built dynamic type.
|
MethodToken(List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new method token representing a constructor to implement for the built dynamic type.
|
MethodToken(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new method token representing a method to implement for the built dynamic type.
|
MethodToken(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new method token representing a method to implement for the built dynamic type.
|
| Modifier and Type | Method and Description |
|---|---|
static Map<TypeDescription,Class<?>> |
ClassLoaderByteArrayInjector.inject(ClassLoaderByteArrayInjector classLoaderByteArrayInjector,
Map<TypeDescription,byte[]> types)
Injects a given type mapping into a class loader byte array injector.
|
Map<TypeDescription,Class<?>> |
ClassReloadingStrategy.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types) |
static Map<TypeDescription,Class<?>> |
ByteArrayClassLoader.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types,
ProtectionDomain protectionDomain,
ByteArrayClassLoader.PersistenceHandler persistenceHandler,
boolean childFirst)
Loads a given set of class descriptions and their binary representations.
|
| Modifier and Type | Method and Description |
|---|---|
static Map<TypeDescription,Class<?>> |
ClassLoaderByteArrayInjector.inject(ClassLoaderByteArrayInjector classLoaderByteArrayInjector,
Map<TypeDescription,byte[]> types)
Injects a given type mapping into a class loader byte array injector.
|
Map<TypeDescription,Class<?>> |
ClassReloadingStrategy.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types) |
static Map<TypeDescription,Class<?>> |
ByteArrayClassLoader.load(ClassLoader classLoader,
Map<TypeDescription,byte[]> types,
ProtectionDomain protectionDomain,
ByteArrayClassLoader.PersistenceHandler persistenceHandler,
boolean childFirst)
Loads a given set of class descriptions and their binary representations.
|
static ClassLoader |
ByteArrayClassLoader.of(ClassLoader parent,
Map<TypeDescription,byte[]> typeDefinitions,
ProtectionDomain protectionDomain,
ByteArrayClassLoader.PersistenceHandler persistenceHandler,
boolean childFirst)
Creates a new class loader for a given definition of classes.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
MethodRegistry.Prepared.getInstrumentedType()
The readily prepared instrumented type with all optional members registered as they are required
by this instances
Instrumentations. |
TypeDescription |
MethodRegistry.Compiled.getInstrumentedType()
The readily prepared instrumented type with all optional members registered as they are required
by this instances
Instrumentations. |
TypeDescription |
MethodRegistry.Default.Prepared.getInstrumentedType() |
TypeDescription |
MethodRegistry.Default.Compiled.getInstrumentedType() |
| Modifier and Type | Method and Description |
|---|---|
ElementMatcher<? super MethodDescription> |
MethodRegistry.LatentMethodMatcher.manifest(TypeDescription typeDescription)
Manifests a latent method matcher.
|
ElementMatcher<? super MethodDescription> |
MethodRegistry.LatentMethodMatcher.Simple.manifest(TypeDescription instrumentedType) |
ElementMatcher<? super MethodDescription> |
MethodRegistry.Default.ListDifferenceMethodMatcher.manifest(TypeDescription typeDescription) |
FieldRegistry.Prepared |
FieldRegistry.prepare(TypeDescription instrumentedType)
Prepares the field registry for a given instrumented type.
|
FieldRegistry.Prepared |
FieldRegistry.Default.prepare(TypeDescription instrumentedType) |
| Constructor and Description |
|---|
Compiled(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
MethodList invokableMethods,
List<MethodRegistry.Default.Compiled.Entry> entries,
TypeWriter.MethodPool.Entry fallback)
Creates a new compiled default method registry.
|
Default(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
List<DynamicType> explicitAuxiliaryTypes,
ClassFileVersion classFileVersion,
TypeWriter.Engine engine)
Creates a new immutable type writer.
|
ForCreation(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
List<? extends MethodDescription> invokableMethods,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
TypeWriter.FieldPool fieldPool,
TypeWriter.MethodPool methodPool)
Creates a new type writer engine for redefining an existent class file.
|
ForRedefinition(TypeDescription instrumentedType,
TypeDescription targetType,
ClassFileVersion classFileVersion,
List<? extends MethodDescription> invokableMethods,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
TypeWriter.FieldPool fieldPool,
TypeWriter.MethodPool methodPool,
ClassFileLocator classFileLocator,
MethodRebaseResolver methodRebaseResolver)
Creates a new type writer that reads a class file and weaves in user defined method implementations.
|
Prepared(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
List<MethodRegistry.Default.Entry> entries,
List<MethodRegistry.Default.Entry> additionalEntries)
Creates a new prepared default method registry.
|
| Modifier and Type | Class and Description |
|---|---|
class |
InlineInstrumentedType
An instrumented type which enhances a given type description by an extending redefinition.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
InlineInstrumentedType.detach() |
TypeDescription |
RebaseInstrumentationTarget.getOriginType() |
TypeDescription |
InlineInstrumentedType.getSupertype() |
TypeDescription |
RebaseInstrumentationTarget.RebasedMethodSpecialMethodInvocation.getTypeDescription() |
| Modifier and Type | Method and Description |
|---|---|
protected DynamicType.Builder<T> |
InlineDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens) |
static InlineDynamicTypeBuilder.TargetHandler.Prepared |
InlineDynamicTypeBuilder.TargetHandler.Prepared.ForRebaseInstrumentation.of(ElementMatcher<? super MethodDescription> ignoredMethods,
ClassFileVersion classFileVersion,
TypeDescription instrumentedType,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a target handler for a rebase instrumentation.
|
static Instrumentation.SpecialMethodInvocation |
RebaseInstrumentationTarget.RebasedMethodSpecialMethodInvocation.of(MethodRebaseResolver.Resolution resolution,
TypeDescription instrumentedType)
Creates a special method invocation for a rebased method if such an invocation is possible or otherwise
returns an illegal special method invocation.
|
InlineDynamicTypeBuilder.TargetHandler.Prepared |
InlineDynamicTypeBuilder.TargetHandler.prepare(ElementMatcher<? super MethodDescription> ignoredMethods,
ClassFileVersion classFileVersion,
TypeDescription instrumentedType)
Prepares this target handler to a given set of type creation properties.
|
InlineDynamicTypeBuilder.TargetHandler.Prepared |
InlineDynamicTypeBuilder.TargetHandler.ForRedefinitionInstrumentation.prepare(ElementMatcher<? super MethodDescription> ignoredMethods,
ClassFileVersion classFileVersion,
TypeDescription instrumentedType) |
InlineDynamicTypeBuilder.TargetHandler.Prepared |
InlineDynamicTypeBuilder.TargetHandler.ForRebaseInstrumentation.prepare(ElementMatcher<? super MethodDescription> ignoredMethods,
ClassFileVersion classFileVersion,
TypeDescription instrumentedType) |
InstrumentedType |
InlineInstrumentedType.withField(String internalName,
TypeDescription fieldType,
int modifiers) |
InstrumentedType |
InlineInstrumentedType.withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers) |
| Modifier and Type | Method and Description |
|---|---|
protected DynamicType.Builder<T> |
InlineDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens) |
InstrumentedType |
InlineInstrumentedType.withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers) |
InstrumentedType |
InlineInstrumentedType.withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers) |
| Constructor and Description |
|---|
Default(ElementMatcher<? super MethodDescription> ignoredMethods,
TypeDescription placeholderType,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a default method rebase resolver.
|
ForRebasedConstructor(MethodDescription methodDescription,
TypeDescription placeholderType)
Creates a
MethodRebaseResolver.Resolution for a
rebased method. |
InlineDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription levelType,
List<? extends TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ClassFileLocator classFileLocator,
InlineDynamicTypeBuilder.TargetHandler targetHandler)
Creates a new immutable type builder for enhancing a given class.
|
InlineDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens,
ClassFileLocator classFileLocator,
InlineDynamicTypeBuilder.TargetHandler targetHandler)
Creates a new immutable type builder for enhancing a given class.
|
InlineInstrumentedType(ClassFileVersion classFileVersion,
TypeDescription levelType,
List<TypeDescription> interfaces,
int modifiers,
NamingStrategy namingStrategy)
Creates a new inlined instrumented type.
|
InlineInstrumentedType(TypeDescription levelType,
String name,
List<TypeDescription> interfaces,
int modifiers,
List<? extends FieldDescription> fieldDescriptions,
List<? extends MethodDescription> methodDescriptions,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer)
Creates a new inlined instrumented type.
|
RebasedMethodSpecialMethodInvocation(MethodRebaseResolver.Resolution resolution,
TypeDescription instrumentedType)
Creates a special method invocation for a rebased method.
|
| Constructor and Description |
|---|
InlineDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription levelType,
List<? extends TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ClassFileLocator classFileLocator,
InlineDynamicTypeBuilder.TargetHandler targetHandler)
Creates a new immutable type builder for enhancing a given class.
|
InlineDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens,
ClassFileLocator classFileLocator,
InlineDynamicTypeBuilder.TargetHandler targetHandler)
Creates a new immutable type builder for enhancing a given class.
|
InlineInstrumentedType(ClassFileVersion classFileVersion,
TypeDescription levelType,
List<TypeDescription> interfaces,
int modifiers,
NamingStrategy namingStrategy)
Creates a new inlined instrumented type.
|
InlineInstrumentedType(TypeDescription levelType,
String name,
List<TypeDescription> interfaces,
int modifiers,
List<? extends FieldDescription> fieldDescriptions,
List<? extends MethodDescription> methodDescriptions,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer)
Creates a new inlined instrumented type.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SubclassInstrumentedType
Represents a type instrumentation that creates a new type based on a given superclass.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
SubclassInstrumentedType.detach() |
TypeDescription |
SubclassInstrumentationTarget.getOriginType() |
TypeDescription |
SubclassInstrumentedType.getSupertype() |
protected abstract TypeDescription |
SubclassInstrumentationTarget.OriginTypeIdentifier.identify(TypeDescription typeDescription)
Identifies the origin type to a given type description.
|
| Modifier and Type | Method and Description |
|---|---|
MethodList |
ConstructorStrategy.extractConstructors(TypeDescription instrumentedType)
Extracts constructors for a given super type.
|
protected abstract TypeDescription |
SubclassInstrumentationTarget.OriginTypeIdentifier.identify(TypeDescription typeDescription)
Identifies the origin type to a given type description.
|
protected DynamicType.Builder<T> |
SubclassDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription targetType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens) |
InstrumentedType |
SubclassInstrumentedType.withField(String internalName,
TypeDescription fieldType,
int modifiers) |
InstrumentedType |
SubclassInstrumentedType.withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers) |
| Modifier and Type | Method and Description |
|---|---|
protected DynamicType.Builder<T> |
SubclassDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription targetType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens) |
InstrumentedType |
SubclassInstrumentedType.withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers) |
InstrumentedType |
SubclassInstrumentedType.withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers) |
| Constructor and Description |
|---|
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription superType,
List<? extends TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ConstructorStrategy constructorStrategy)
Creates a new immutable type builder for a subclassing a given class.
|
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription superType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens,
ConstructorStrategy constructorStrategy)
Creates a new immutable type builder for a subclassing a given class.
|
SubclassInstrumentedType(ClassFileVersion classFileVersion,
TypeDescription superClass,
List<TypeDescription> interfaces,
int modifiers,
NamingStrategy namingStrategy)
Creates a new immutable type instrumentation for a loaded superclass.
|
SubclassInstrumentedType(ClassFileVersion classFileVersion,
TypeDescription superClass,
List<TypeDescription> interfaces,
int modifiers,
String name,
List<? extends FieldDescription> fieldDescriptions,
List<? extends MethodDescription> methodDescriptions,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer)
Creates a new immutable type instrumentation for a loaded superclass.
|
| Constructor and Description |
|---|
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription superType,
List<? extends TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ConstructorStrategy constructorStrategy)
Creates a new immutable type builder for a subclassing a given class.
|
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription superType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens,
ConstructorStrategy constructorStrategy)
Creates a new immutable type builder for a subclassing a given class.
|
SubclassInstrumentedType(ClassFileVersion classFileVersion,
TypeDescription superClass,
List<TypeDescription> interfaces,
int modifiers,
NamingStrategy namingStrategy)
Creates a new immutable type instrumentation for a loaded superclass.
|
SubclassInstrumentedType(ClassFileVersion classFileVersion,
TypeDescription superClass,
List<TypeDescription> interfaces,
int modifiers,
String name,
List<? extends FieldDescription> fieldDescriptions,
List<? extends MethodDescription> methodDescriptions,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer)
Creates a new immutable type instrumentation for a loaded superclass.
|
| Modifier and Type | Field and Description |
|---|---|
protected TypeDescription |
Forwarding.fieldType
The type of the field.
|
protected TypeDescription |
Instrumentation.Target.AbstractBase.typeDescription
The type that is subject to instrumentation.
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<TypeDescription,Map<String,MethodDescription>> |
Instrumentation.Target.AbstractBase.defaultMethods
A map of default methods by their unique signature.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
Instrumentation.Context.Default.FieldCacheEntry.getFieldType()
Returns the field type that is represented by this field cache entry.
|
TypeDescription |
Instrumentation.Target.getOriginType()
Identifies the origin type of an instrumentation.
|
TypeDescription |
Instrumentation.SpecialMethodInvocation.getTypeDescription()
Returns the target type the represented method is invoked on.
|
TypeDescription |
Instrumentation.SpecialMethodInvocation.Illegal.getTypeDescription() |
TypeDescription |
Instrumentation.SpecialMethodInvocation.Simple.getTypeDescription() |
TypeDescription |
Instrumentation.Target.getTypeDescription()
Returns a description of the instrumented type.
|
TypeDescription |
Instrumentation.Target.AbstractBase.getTypeDescription() |
TypeDescription |
Instrumentation.Context.register(AuxiliaryType auxiliaryType)
Registers an auxiliary type as required for the current instrumentation.
|
TypeDescription |
Instrumentation.Context.Default.register(AuxiliaryType auxiliaryType) |
| Modifier and Type | Method and Description |
|---|---|
protected ByteCodeAppender.Size |
InvocationHandlerAdapter.apply(org.objectweb.asm.MethodVisitor methodVisitor,
Instrumentation.Context instrumentationContext,
MethodDescription instrumentedMethod,
TypeDescription instrumentedType,
StackManipulation preparingManipulation)
Applies an instrumentation that delegates to a invocation handler.
|
protected ByteCodeAppender.Size |
FixedValue.apply(org.objectweb.asm.MethodVisitor methodVisitor,
Instrumentation.Context instrumentationContext,
MethodDescription instrumentedMethod,
TypeDescription fixedValueType,
StackManipulation valueLoadingInstruction)
Blueprint method that for applying the actual instrumentation.
|
FieldDescription |
Instrumentation.Context.cache(StackManipulation fieldValue,
TypeDescription fieldType)
Caches a single value by storing it in form of a
private, final and static field. |
FieldDescription |
Instrumentation.Context.Default.cache(StackManipulation fieldValue,
TypeDescription fieldType) |
FieldAccessor.AssignerConfigurable |
FieldAccessor.FieldDefinable.defineAs(TypeDescription typeDescription,
ModifierContributor.ForField... modifier)
Defines a field with the given name in the instrumented type.
|
FieldAccessor.AssignerConfigurable |
FieldAccessor.ForNamedField.defineAs(TypeDescription typeDescription,
ModifierContributor.ForField... modifier) |
MethodDelegationBinder.MethodInvoker |
MethodDelegation.InstrumentationDelegate.getMethodInvoker(TypeDescription instrumentedType)
Returns the method invoker responsible for invoking the delegation method.
|
MethodDelegationBinder.MethodInvoker |
MethodDelegation.InstrumentationDelegate.ForStaticMethod.getMethodInvoker(TypeDescription instrumentedType) |
MethodDelegationBinder.MethodInvoker |
MethodDelegation.InstrumentationDelegate.ForStaticField.getMethodInvoker(TypeDescription instrumentedType) |
MethodDelegationBinder.MethodInvoker |
MethodDelegation.InstrumentationDelegate.ForInstanceField.getMethodInvoker(TypeDescription instrumentedType) |
MethodDelegationBinder.MethodInvoker |
MethodDelegation.InstrumentationDelegate.ForConstruction.getMethodInvoker(TypeDescription instrumentedType) |
StackManipulation |
MethodDelegation.InstrumentationDelegate.getPreparingStackAssignment(TypeDescription instrumentedType)
Returns the stack manipulation responsible for preparing the instance representing the instrumentation.
|
StackManipulation |
MethodDelegation.InstrumentationDelegate.ForStaticMethod.getPreparingStackAssignment(TypeDescription instrumentedType) |
StackManipulation |
MethodDelegation.InstrumentationDelegate.ForStaticField.getPreparingStackAssignment(TypeDescription instrumentedType) |
StackManipulation |
MethodDelegation.InstrumentationDelegate.ForInstanceField.getPreparingStackAssignment(TypeDescription instrumentedType) |
StackManipulation |
MethodDelegation.InstrumentationDelegate.ForConstruction.getPreparingStackAssignment(TypeDescription instrumentedType) |
FieldAccessor.AssignerConfigurable |
FieldAccessor.OwnerTypeLocatable.in(TypeDescription typeDescription)
Determines that a field should only be considered when it was defined in a given type.
|
FieldAccessor.AssignerConfigurable |
FieldAccessor.ForUnnamedField.in(TypeDescription typeDescription) |
FieldAccessor.AssignerConfigurable |
FieldAccessor.ForNamedField.in(TypeDescription typeDescription) |
Instrumentation.SpecialMethodInvocation |
Instrumentation.Target.invokeDefault(TypeDescription targetType,
String uniqueMethodSignature)
Creates a special method invocation for invoking a default method.
|
Instrumentation.SpecialMethodInvocation |
Instrumentation.Target.AbstractBase.invokeDefault(TypeDescription targetType,
String uniqueMethodSignature) |
boolean |
ByteCodeElement.isVisibleTo(TypeDescription typeDescription)
Checks if this element is visible from a given type.
|
FieldAccessor.FieldLocator |
FieldAccessor.FieldLocator.ForInstrumentedType.make(TypeDescription instrumentedType) |
FieldAccessor.FieldLocator |
FieldAccessor.FieldLocator.Factory.make(TypeDescription instrumentedType)
Creates a field locator.
|
FieldAccessor.FieldLocator |
FieldAccessor.FieldLocator.ForInstrumentedTypeHierarchy.Factory.make(TypeDescription instrumentedType) |
FieldAccessor.FieldLocator |
FieldAccessor.FieldLocator.ForGivenType.Factory.make(TypeDescription instrumentedType) |
String |
Instrumentation.Context.Default.AuxiliaryTypeNamingStrategy.name(AuxiliaryType auxiliaryType,
TypeDescription instrumentedType)
NAmes an auxiliary type.
|
String |
Instrumentation.Context.Default.AuxiliaryTypeNamingStrategy.SuffixingRandom.name(AuxiliaryType auxiliaryType,
TypeDescription instrumentedType) |
static Instrumentation.SpecialMethodInvocation |
Instrumentation.SpecialMethodInvocation.Simple.of(MethodDescription methodDescription,
TypeDescription typeDescription)
Creates a special method invocation for a given invocation target.
|
InstrumentedType |
Forwarding.PreparationHandler.prepare(InstrumentedType instrumentedType,
String fieldName,
TypeDescription fieldType)
Prepares the instrumented type.
|
InstrumentedType |
Forwarding.PreparationHandler.ForInstanceField.prepare(InstrumentedType instrumentedType,
String fieldName,
TypeDescription fieldType) |
InstrumentedType |
Forwarding.PreparationHandler.ForStaticField.prepare(InstrumentedType instrumentedType,
String fieldName,
TypeDescription fieldType) |
InstrumentedType |
Forwarding.PreparationHandler.ForStaticInstance.prepare(InstrumentedType instrumentedType,
String fieldName,
TypeDescription fieldType) |
static Instrumentation |
DefaultMethodCall.prioritize(TypeDescription... prioritizedInterface)
Creates a
DefaultMethodCall instrumentation which searches the given list
of interface types for a suitable default method in their order. |
static Instrumentation |
ExceptionMethod.throwing(TypeDescription throwable)
Creates an instrumentation that creates a new instance of the given isThrowable type on each method invocation
which is then thrown immediately.
|
static Instrumentation |
ExceptionMethod.throwing(TypeDescription exceptionType,
String message)
Creates an instrumentation that creates a new instance of the given isThrowable type on each method invocation
which is then thrown immediately.
|
static MethodDelegation |
MethodDelegation.to(TypeDescription typeDescription)
Creates an instrumentation where only
static methods of the given type are considered as binding targets. |
static MethodDelegation |
MethodDelegation.toConstructor(TypeDescription typeDescription)
Creates an instrumentation where method calls are delegated to constructor calls on the given type.
|
static Instrumentation |
Forwarding.toInstanceField(String fieldName,
TypeDescription fieldType)
Forwards all intercepted method invocations to an instance field of the instrumented class.
|
static MethodDelegation |
MethodDelegation.toInstanceField(TypeDescription typeDescription,
String fieldName)
Creates an instrumentation where method calls are delegated to an instance that is manually stored in a field
fieldName that is defined for the instrumented type. |
static MethodDelegation |
MethodDelegation.toInstanceField(TypeDescription typeDescription,
String fieldName,
MethodLookupEngine methodLookupEngine)
Identical to
MethodDelegation.toInstanceField(Class, String) but uses an
explicit MethodLookupEngine. |
static Instrumentation |
Forwarding.toStaticField(String fieldName,
TypeDescription fieldType)
Forwards all intercepted method invocations to a
static field of the instrumented class. |
| Constructor and Description |
|---|
Appender(TypeDescription instrumentedType)
Creates a new appender.
|
Appender(TypeDescription instrumentedType)
Creates a new appender.
|
Default(TypeDescription instrumentedType,
InstrumentedType.TypeInitializer typeInitializer,
ClassFileVersion classFileVersion)
Creates a new delegate.
|
Default(TypeDescription instrumentedType,
InstrumentedType.TypeInitializer typeInitializer,
ClassFileVersion classFileVersion,
String accessorMethodSuffix,
String fieldCachePrefix,
Instrumentation.Context.Default.AuxiliaryTypeNamingStrategy auxiliaryTypeNamingStrategy)
Creates a new delegate.
|
ExceptionMethod(TypeDescription throwableType,
ExceptionMethod.ConstructionDelegate constructionDelegate)
Creates a new instance of an instrumentation for throwing throwables.
|
Factory(TypeDescription targetType)
Creates a new field locator factory for a given type.
|
FieldCacheEntry(StackManipulation fieldValue,
TypeDescription fieldType)
Creates a new field cache entry.
|
ForConstruction(TypeDescription typeDescription)
Creates a new constructor instrumentation.
|
ForDefaultConstructor(TypeDescription exceptionType)
Creates a new construction delegate that calls a default constructor.
|
ForGivenType(TypeDescription targetType,
TypeDescription instrumentedType)
Creates a new field locator for a given type.
|
ForInstanceField(TypeDescription fieldType,
String fieldName)
Creates a new instance field instrumentation delegate.
|
ForInstrumentedTypeHierarchy(TypeDescription instrumentedType)
Creates a field locator that follows the type hierarchy.
|
ForStringConstructor(TypeDescription exceptionType,
String message)
Creates a new construction delegate that calls a constructor by handing it the given string.
|
Forwarding(String fieldName,
TypeDescription fieldType,
Forwarding.PreparationHandler preparationHandler)
Creates a new forwarding instrumentation.
|
Simple(MethodDescription methodDescription,
TypeDescription typeDescription,
StackManipulation stackManipulation)
Creates a new legal special method invocation.
|
| Constructor and Description |
|---|
Appender(Instrumentation.Target instrumentationTarget,
List<TypeDescription> prioritizedInterfaces)
Creates a new appender for implementing a
DefaultMethodCall. |
DefaultMethodCall(List<TypeDescription> prioritizedInterfaces)
Creates a new
DefaultMethodCall instrumentation for a given list of
prioritized interfaces. |
| Modifier and Type | Method and Description |
|---|---|
void |
TypeAttributeAppender.apply(org.objectweb.asm.ClassVisitor classVisitor,
TypeDescription typeDescription)
Applies this type attribute appender.
|
void |
TypeAttributeAppender.NoOp.apply(org.objectweb.asm.ClassVisitor classVisitor,
TypeDescription typeDescription) |
void |
TypeAttributeAppender.ForSuperType.apply(org.objectweb.asm.ClassVisitor classVisitor,
TypeDescription typeDescription) |
void |
TypeAttributeAppender.ForAnnotation.apply(org.objectweb.asm.ClassVisitor classVisitor,
TypeDescription typeDescription) |
void |
TypeAttributeAppender.ForType.apply(org.objectweb.asm.ClassVisitor classVisitor,
TypeDescription typeDescription) |
void |
TypeAttributeAppender.Compound.apply(org.objectweb.asm.ClassVisitor classVisitor,
TypeDescription typeDescription) |
MethodAttributeAppender |
MethodAttributeAppender.NoOp.make(TypeDescription typeDescription) |
MethodAttributeAppender |
MethodAttributeAppender.ForInstrumentedMethod.make(TypeDescription typeDescription) |
MethodAttributeAppender |
MethodAttributeAppender.Factory.make(TypeDescription typeDescription)
Returns a method attribute appender that is applicable for a given type description.
|
MethodAttributeAppender |
MethodAttributeAppender.Factory.Compound.make(TypeDescription typeDescription) |
MethodAttributeAppender |
MethodAttributeAppender.ForAnnotation.make(TypeDescription typeDescription) |
MethodAttributeAppender |
MethodAttributeAppender.ForLoadedMethod.make(TypeDescription typeDescription) |
MethodAttributeAppender |
MethodAttributeAppender.ForLoadedConstructor.make(TypeDescription typeDescription) |
FieldAttributeAppender |
FieldAttributeAppender.NoOp.make(TypeDescription typeDescription) |
FieldAttributeAppender |
FieldAttributeAppender.Factory.make(TypeDescription typeDescription)
Returns a field attribute appender that is applicable for a given type description.
|
FieldAttributeAppender |
FieldAttributeAppender.Factory.Compound.make(TypeDescription typeDescription) |
FieldAttributeAppender |
FieldAttributeAppender.ForAnnotation.make(TypeDescription typeDescription) |
FieldAttributeAppender |
FieldAttributeAppender.ForLoadedField.make(TypeDescription typeDescription) |
| Constructor and Description |
|---|
ForType(TypeDescription typeDescription)
Creates a new attribute appender that writes all annotations declared for the given type description.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
AnnotationDescription.getAnnotationType()
Returns a description of the annotation type of this annotation.
|
TypeDescription |
AnnotationDescription.ForLoadedAnnotation.getAnnotationType() |
TypeDescription |
AnnotationDescription.EnumerationValue.getEnumerationType()
Returns the type of this enumeration.
|
TypeDescription |
AnnotationDescription.EnumerationValue.ForLoadedEnumeration.getEnumerationType() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
AnnotationList.isAnnotationPresent(TypeDescription annotationType)
Checks if this list contains an annotation of the given type.
|
boolean |
AnnotationList.ForLoadedAnnotation.isAnnotationPresent(TypeDescription annotationType) |
boolean |
AnnotationList.Explicit.isAnnotationPresent(TypeDescription annotationType) |
boolean |
AnnotationList.Empty.isAnnotationPresent(TypeDescription annotationType) |
static Object |
AnnotationDescription.ForLoadedAnnotation.wrap(Object value,
TypeDescription typeDescription)
A helper method for converting a loaded type into a representation that is also capable of representing
unloaded descriptions of annotation values as specified by
AnnotationDescription. |
| Modifier and Type | Method and Description |
|---|---|
AnnotationList |
AnnotationList.inherited(Set<? extends TypeDescription> ignoredTypes)
Returns only annotations that are marked as
Inherited as long as they are not
contained by the set of ignored annotation types. |
AnnotationList |
AnnotationList.ForLoadedAnnotation.inherited(Set<? extends TypeDescription> ignoredTypes) |
AnnotationList |
AnnotationList.Explicit.inherited(Set<? extends TypeDescription> ignoredTypes) |
AnnotationList |
AnnotationList.Empty.inherited(Set<? extends TypeDescription> ignoredTypes) |
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
FieldDescription.ForLoadedField.getDeclaringType() |
TypeDescription |
FieldDescription.Latent.getDeclaringType() |
TypeDescription |
FieldDescription.getFieldType()
Returns a description of the type of this field.
|
TypeDescription |
FieldDescription.ForLoadedField.getFieldType() |
TypeDescription |
FieldDescription.Latent.getFieldType() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
FieldDescription.AbstractFieldDescription.isVisibleTo(TypeDescription typeDescription) |
| Constructor and Description |
|---|
Latent(String fieldName,
TypeDescription declaringType,
TypeDescription fieldType,
int modifiers)
Creates an immutable latent field description.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
MethodLookupEngine.OverridenClassMethod.getDeclaringType() |
TypeDescription |
MethodLookupEngine.ConflictingInterfaceMethod.getDeclaringType() |
TypeDescription |
MethodDescription.ForLoadedConstructor.getDeclaringType() |
TypeDescription |
MethodDescription.ForLoadedMethod.getDeclaringType() |
TypeDescription |
MethodDescription.Latent.getDeclaringType() |
TypeDescription |
MethodLookupEngine.OverridenClassMethod.getReturnType() |
TypeDescription |
MethodLookupEngine.ConflictingInterfaceMethod.getReturnType() |
TypeDescription |
MethodDescription.getReturnType()
Returns a description of the return type of the method described by this instance.
|
TypeDescription |
MethodDescription.ForLoadedConstructor.getReturnType() |
TypeDescription |
MethodDescription.ForLoadedMethod.getReturnType() |
TypeDescription |
MethodDescription.Latent.getReturnType() |
TypeDescription |
MethodLookupEngine.Finding.getTypeDescription()
Returns the type description for which the finding was created.
|
TypeDescription |
MethodLookupEngine.Finding.Default.getTypeDescription() |
| Modifier and Type | Method and Description |
|---|---|
abstract Map<TypeDescription,Set<MethodDescription>> |
MethodLookupEngine.Default.DefaultMethodLookup.apply(MethodLookupEngine.Default.MethodBucket methodBucket,
Collection<TypeDescription> interfaces,
Collection<TypeDescription> defaultMethodRelevantInterfaces)
Applies default method extraction.
|
Map<TypeDescription,Set<MethodDescription>> |
MethodLookupEngine.Finding.getInvokableDefaultMethods()
Returns a map of interfaces that are eligible for default method invocation on the type this finding
was created for.
|
Map<TypeDescription,Set<MethodDescription>> |
MethodLookupEngine.Finding.Default.getInvokableDefaultMethods() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
MethodLookupEngine.OverridenClassMethod.isSpecializableFor(TypeDescription targetType) |
boolean |
MethodLookupEngine.ConflictingInterfaceMethod.isSpecializableFor(TypeDescription targetType) |
boolean |
MethodDescription.isSpecializableFor(TypeDescription typeDescription)
Checks if this method can be called using the
INVOKESPECIAL for a given type. |
boolean |
MethodDescription.AbstractMethodDescription.isSpecializableFor(TypeDescription targetType) |
boolean |
MethodDescription.AbstractMethodDescription.isVisibleTo(TypeDescription typeDescription) |
protected static MethodDescription |
MethodLookupEngine.ConflictingInterfaceMethod.of(TypeDescription virtualHost,
MethodDescription conflictingMethod,
MethodDescription discoveredMethod)
Creates a new method description for at least two conflicting interface methods.
|
MethodLookupEngine.Finding |
MethodLookupEngine.process(TypeDescription typeDescription)
Retrieves all methods that can be called on a given type.
|
MethodLookupEngine.Finding |
MethodLookupEngine.Default.process(TypeDescription typeDescription) |
static MethodDescription |
MethodDescription.Latent.typeInitializerOf(TypeDescription declaringType)
Creates a latent method description of a type initializer (
<clinit>) for a given type. |
| Modifier and Type | Method and Description |
|---|---|
abstract Map<TypeDescription,Set<MethodDescription>> |
MethodLookupEngine.Default.DefaultMethodLookup.apply(MethodLookupEngine.Default.MethodBucket methodBucket,
Collection<TypeDescription> interfaces,
Collection<TypeDescription> defaultMethodRelevantInterfaces)
Applies default method extraction.
|
abstract Map<TypeDescription,Set<MethodDescription>> |
MethodLookupEngine.Default.DefaultMethodLookup.apply(MethodLookupEngine.Default.MethodBucket methodBucket,
Collection<TypeDescription> interfaces,
Collection<TypeDescription> defaultMethodRelevantInterfaces)
Applies default method extraction.
|
| Constructor and Description |
|---|
ConflictingInterfaceMethod(TypeDescription virtualHost,
List<MethodDescription> methodDescriptions)
Creates a new conflicting interface method.
|
Default(TypeDescription lookedUpType,
MethodList invokableMethods,
Map<TypeDescription,Set<MethodDescription>> invokableDefaultMethods)
Creates a default of a
MethodLookupEngine.Finding. |
Latent(String internalName,
TypeDescription declaringType,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
int modifiers,
List<? extends TypeDescription> exceptionTypes)
Creates an immutable latent method description.
|
MethodBucket(TypeDescription typeOfInterest)
Creates a new mutable method bucket.
|
| Constructor and Description |
|---|
Default(TypeDescription lookedUpType,
MethodList invokableMethods,
Map<TypeDescription,Set<MethodDescription>> invokableDefaultMethods)
Creates a default of a
MethodLookupEngine.Finding. |
Latent(String internalName,
TypeDescription declaringType,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
int modifiers,
List<? extends TypeDescription> exceptionTypes)
Creates an immutable latent method description.
|
Latent(String internalName,
TypeDescription declaringType,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
int modifiers,
List<? extends TypeDescription> exceptionTypes)
Creates an immutable latent method description.
|
| Constructor and Description |
|---|
Virtual(TypeDescription typeDescription)
Creates an immutable method invoker that dispatches all methods on a given type.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
Pipe.Binder.PrecomputedFinding.getTypeDescription() |
TypeDescription |
Morph.Binder.PrecomputedFinding.getTypeDescription() |
protected abstract TypeDescription |
Field.Binder.AccessType.proxyType(MethodDescription getterMethod,
MethodDescription setterMethod)
Locates the type to be implemented by a field accessor proxy.
|
| Modifier and Type | Method and Description |
|---|---|
Map<TypeDescription,Set<MethodDescription>> |
Pipe.Binder.PrecomputedFinding.getInvokableDefaultMethods() |
Map<TypeDescription,Set<MethodDescription>> |
Morph.Binder.PrecomputedFinding.getInvokableDefaultMethods() |
| Modifier and Type | Method and Description |
|---|---|
static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> |
Pipe.Binder.install(TypeDescription typeDescription)
Installs a given type for use on a
Pipe
annotation. |
static TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph> |
Morph.Binder.install(TypeDescription typeDescription)
Installs a given type for use on a
Morph
annotation. |
static TargetMethodAnnotationDrivenBinder.ParameterBinder<Field> |
Field.Binder.install(TypeDescription getterType,
TypeDescription setterType)
Creates a binder by installing two proxy types which are implemented by this binder if a field getter
or a field setter is requested by using the
Field annotation. |
protected abstract Field.Binder.FieldLocator.LookupEngine |
Field.Binder.FieldLocator.lookup(TypeDescription typeDescription,
TypeDescription instrumentedType)
Locates a field of a given name on a specific type.
|
protected Field.Binder.FieldLocator.LookupEngine |
Field.Binder.FieldLocator.Legal.lookup(TypeDescription typeDescription,
TypeDescription instrumentedType) |
protected Field.Binder.FieldLocator.LookupEngine |
Field.Binder.FieldLocator.Illegal.lookup(TypeDescription typeDescription,
TypeDescription instrumentedType) |
protected abstract MethodDelegationBinder.ParameterBinding<?> |
Argument.BindingMechanic.makeBinding(TypeDescription sourceType,
TypeDescription targetType,
int sourceParameterIndex,
Assigner assigner,
boolean considerRuntimeType,
int parameterOffset)
Creates a binding that corresponds to this binding mechanic.
|
MethodLookupEngine.Finding |
Pipe.Binder.process(TypeDescription typeDescription) |
MethodLookupEngine.Finding |
Morph.Binder.process(TypeDescription typeDescription) |
protected abstract StackManipulation |
Super.Instantiation.proxyFor(TypeDescription parameterType,
Instrumentation.Target instrumentationTarget,
AnnotationDescription.Loadable<Super> annotation)
Creates a stack manipulation which loads a
super-call proxy onto the stack. |
protected abstract Field.Binder.FieldLocator.Resolution |
Field.Binder.FieldLocator.LookupEngine.resolve(TypeDescription instrumentedType)
Locates a field if possible and returns a corresponding resolution.
|
protected Field.Binder.FieldLocator.Resolution |
Field.Binder.FieldLocator.LookupEngine.Illegal.resolve(TypeDescription instrumentedType) |
protected Field.Binder.FieldLocator.Resolution |
Field.Binder.FieldLocator.LookupEngine.ForHierarchy.resolve(TypeDescription instrumentedType) |
protected Field.Binder.FieldLocator.Resolution |
Field.Binder.FieldLocator.LookupEngine.ForExplicitType.resolve(TypeDescription instrumentedType) |
| Constructor and Description |
|---|
AccessorProxy(FieldDescription accessedField,
Assigner assigner,
TypeDescription instrumentedType,
Field.Binder.AccessType accessType,
boolean serializableProxy) |
Explicit(TypeDescription typeDescription)
Creates a new explicit default method locator.
|
Explicit(TypeDescription typeDescription)
Creates a new explicit default method locator.
|
ForExplicitType(String fieldName,
TypeDescription typeDescription)
Creates a new lookup engine for a given type.
|
InstanceFieldConstructor(TypeDescription instrumentedType)
Creates a new instance field constructor instrumentation.
|
InstanceFieldConstructor(TypeDescription instrumentedType)
Creates a new instrumentation for implementing a field accessor proxy's constructor when accessing
a non-static field.
|
PrecomputedFinding(TypeDescription typeDescription)
Creates a precomputed finding.
|
PrecomputedFinding(TypeDescription typeDescription)
Creates a new precomputed finding.
|
Redirection(TypeDescription forwardingType,
MethodDescription sourceMethod,
Assigner assigner,
boolean serializableProxy,
MethodLookupEngine.Factory methodLookupEngineFactory)
Creates a new redirection.
|
RedirectionProxy(TypeDescription morphingType,
TypeDescription instrumentedType,
Instrumentation.SpecialMethodInvocation specialMethodInvocation,
Assigner assigner,
boolean serializableProxy,
MethodLookupEngine.Factory methodLookupEngineFactory)
Creates a new redirection proxy.
|
| Modifier and Type | Method and Description |
|---|---|
static StackManipulation |
Duplication.duplicate(TypeDescription typeDescription)
Duplicates a value given its type.
|
static StackManipulation |
TypeCreation.forType(TypeDescription typeDescription)
Creates a type creation for the given type.
|
static StackManipulation |
Removal.pop(TypeDescription typeDescription)
Removes a value from the operand stack dependant of its size.
|
| Constructor and Description |
|---|
TypeCreation(TypeDescription typeDescription)
Constructs a new type creation.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation |
Assigner.assign(TypeDescription sourceType,
TypeDescription targetType,
boolean dynamicallyTyped) |
| Modifier and Type | Method and Description |
|---|---|
StackManipulation |
VoidAwareAssigner.assign(TypeDescription sourceType,
TypeDescription targetType,
boolean dynamicallyTyped) |
StackManipulation |
PrimitiveTypeAwareAssigner.assign(TypeDescription sourceType,
TypeDescription targetType,
boolean dynamicallyTyped) |
StackManipulation |
PrimitiveBoxingDelegate.assignBoxedTo(TypeDescription targetType,
Assigner chainedAssigner,
boolean considerRuntimeType)
Creates a stack manipulation that boxes the represented primitive type and applies a chained assignment
to the result of this boxing operation.
|
StackManipulation |
PrimitiveUnboxingDelegate.ExplicitlyTypedUnboxingResponsible.assignUnboxedTo(TypeDescription targetType,
Assigner assigner,
boolean considerRuntimeType) |
StackManipulation |
PrimitiveUnboxingDelegate.UnboxingResponsible.assignUnboxedTo(TypeDescription targetType,
Assigner assigner,
boolean considerRuntimeType)
Attempts to unbox the represented type in order to assign the unboxed value to the given target type
while using the assigner that is provided by the method call.
|
StackManipulation |
PrimitiveUnboxingDelegate.ImplicitlyTypedUnboxingResponsible.assignUnboxedTo(TypeDescription targetType,
Assigner assigner,
boolean considerRuntimeType) |
static PrimitiveWideningDelegate |
PrimitiveWideningDelegate.forPrimitive(TypeDescription typeDescription)
Locates the delegate that is capable of widening the given type into another type.
|
protected static PrimitiveUnboxingDelegate |
PrimitiveUnboxingDelegate.forPrimitive(TypeDescription typeDescription)
Locates a primitive unboxing delegate for a given primitive type.
|
static PrimitiveBoxingDelegate |
PrimitiveBoxingDelegate.forPrimitive(TypeDescription typeDescription)
Locates a boxing delegate for a given primitive type.
|
static PrimitiveUnboxingDelegate.UnboxingResponsible |
PrimitiveUnboxingDelegate.forReferenceType(TypeDescription typeDescription)
Creates an unboxing responsible that is capable of unboxing a wrapper type.
|
StackManipulation |
PrimitiveWideningDelegate.widenTo(TypeDescription typeDescription)
Attempts to widen the represented type into another type.
|
| Constructor and Description |
|---|
ImplicitlyTypedUnboxingResponsible(TypeDescription originalType)
Creates a new implicitly typed unboxing responsible.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation |
ReferenceTypeAwareAssigner.assign(TypeDescription sourceType,
TypeDescription targetType,
boolean dynamicallyTyped) |
| Constructor and Description |
|---|
DownCasting(TypeDescription targetType)
Creates a new type casting.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
CollectionFactory.getComponentType()
The component type of this factory.
|
TypeDescription |
ArrayFactory.getComponentType() |
| Modifier and Type | Method and Description |
|---|---|
static ArrayAccess |
ArrayAccess.of(TypeDescription componentType)
Locates an array accessor by the array's component type.
|
static ArrayFactory |
ArrayFactory.targeting(TypeDescription componentType)
Creates a new array factory for a given component type.
|
| Constructor and Description |
|---|
ArrayFactory(TypeDescription componentType,
ArrayFactory.ArrayCreator arrayCreator)
Creates a new array factory with a given
ArrayFactory.ArrayCreator
without inferring the type from the component type. |
ForReferenceType(TypeDescription referenceType)
Creates a new array creator for a reference type.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
MethodTypeConstant.isRepresentedBy(TypeDescription typeDescription)
Checks if a type represents the
java.lang.invoke.MethodType type. |
static boolean |
MethodHandleConstant.isRepresentedBy(TypeDescription typeDescription)
Checks if a type represents the
java.lang.invoke.MethodHandle type. |
static StackManipulation |
DefaultValue.of(TypeDescription typeDescription)
Creates a stack assignment that loads the default value for a given type.
|
static StackManipulation |
ClassConstant.of(TypeDescription typeDescription)
Returns a stack manipulation that loads a
Class type onto the operand stack which
represents the given type. |
| Constructor and Description |
|---|
ForReferenceType(TypeDescription typeDescription)
Creates a stack manipulation that represents loading a class constant onto the stack.
|
| Modifier and Type | Method and Description |
|---|---|
static MethodVariableAccess |
MethodVariableAccess.forType(TypeDescription typeDescription)
Locates the correct accessor for a variable of a given type.
|
static StackManipulation |
MethodReturn.returning(TypeDescription typeDescription)
Returns a method return corresponding to a given type.
|
StackManipulation |
MethodInvocation.IllegalInvocation.special(TypeDescription invocationTarget) |
StackManipulation |
MethodInvocation.WithImplicitInvocationTargetType.special(TypeDescription invocationTarget)
Transforms this method invocation into a special invocation on the given type.
|
StackManipulation |
MethodInvocation.Invocation.special(TypeDescription invocationTarget) |
StackManipulation |
MethodInvocation.IllegalInvocation.virtual(TypeDescription invocationTarget) |
StackManipulation |
MethodInvocation.WithImplicitInvocationTargetType.virtual(TypeDescription invocationTarget)
Transforms this method invocation into a virtual (or interface) method invocation on the given type.
|
StackManipulation |
MethodInvocation.Invocation.virtual(TypeDescription invocationTarget) |
StackManipulation |
MethodVariableAccess.TypeCastingHandler.wrapNext(StackManipulation variableAccess,
TypeDescription parameterType)
Returns the given stack manipulation while possibly wrapping the operation by a type casting
if this is required.
|
StackManipulation |
MethodVariableAccess.TypeCastingHandler.NoOp.wrapNext(StackManipulation variableAccess,
TypeDescription parameterType) |
StackManipulation |
MethodVariableAccess.TypeCastingHandler.ForBridgeTarget.wrapNext(StackManipulation variableAccess,
TypeDescription parameterType) |
| Constructor and Description |
|---|
Invocation(MethodDescription methodDescription,
TypeDescription typeDescription)
Creates an invocation of a given method on a given invocation target type.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
InstrumentedType
Implementations of this interface represent an instrumented type that is subject to change.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
InstrumentedType.AbstractBase
An abstract base implementation of an instrumented type.
|
static class |
TypeDescription.AbstractTypeDescription
An abstract base implementation of a type description.
|
static class |
TypeDescription.AbstractTypeDescription.OfSimpleType
An adapter implementation of a
TypeDescription that
describes any type that is not an array or a primitive type. |
static class |
TypeDescription.ArrayProjection
A projection for an array type based on an existing
TypeDescription. |
static class |
TypeDescription.ForLoadedType
A type description implementation that represents a loaded type.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
InstrumentedType.detach()
Creates a compressed version of this instrumented type which only needs to fulfil the
TypeDescription interface. |
TypeDescription |
TypeList.ForLoadedType.get(int index) |
TypeDescription |
TypeList.Explicit.get(int index) |
TypeDescription |
TypeDescription.getComponentType()
Returns the component type of this type.
|
TypeDescription |
TypeDescription.AbstractTypeDescription.OfSimpleType.getComponentType() |
TypeDescription |
TypeDescription.ForLoadedType.getComponentType() |
TypeDescription |
TypeDescription.ArrayProjection.getComponentType() |
TypeDescription |
TypeDescription.ForLoadedType.getDeclaringType() |
TypeDescription |
TypeDescription.ArrayProjection.getDeclaringType() |
TypeDescription |
InstrumentedType.AbstractBase.getDeclaringType() |
TypeDescription |
InstrumentedType.AbstractBase.FieldToken.getDeclaringType() |
TypeDescription |
InstrumentedType.AbstractBase.MethodToken.getDeclaringType() |
TypeDescription |
DeclaredInType.getDeclaringType()
Returns the declaring type of this instance.
|
TypeDescription |
TypeDescription.getEnclosingType()
Returns a description of the enclosing type of this type.
|
TypeDescription |
TypeDescription.ForLoadedType.getEnclosingType() |
TypeDescription |
TypeDescription.ArrayProjection.getEnclosingType() |
TypeDescription |
InstrumentedType.AbstractBase.getEnclosingType() |
TypeDescription |
InstrumentedType.AbstractBase.FieldToken.getFieldType() |
TypeDescription |
InstrumentedType.AbstractBase.MethodToken.getReturnType() |
TypeDescription |
TypeDescription.getSupertype()
Returns the component type of this type.
|
TypeDescription |
TypeDescription.ForLoadedType.getSupertype() |
TypeDescription |
TypeDescription.ArrayProjection.getSupertype() |
static TypeDescription |
TypeDescription.ArrayProjection.of(TypeDescription componentType,
int arity)
Creates an array projection.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
TypeDescription.isAssignableFrom(TypeDescription typeDescription)
Checks if this type is assignable from the type described by this instance, for example for
class Foo and class Bar extends Foo, this method would return true for
Foo.class.isAssignableFrom(Bar.class). |
boolean |
TypeDescription.AbstractTypeDescription.OfSimpleType.isAssignableFrom(TypeDescription typeDescription) |
boolean |
TypeDescription.ForLoadedType.isAssignableFrom(TypeDescription typeDescription) |
boolean |
TypeDescription.ArrayProjection.isAssignableFrom(TypeDescription typeDescription) |
boolean |
TypeDescription.isAssignableTo(TypeDescription typeDescription)
Checks if this type is assignable from the type described by this instance, for example for
class Foo and class Bar extends Foo, this method would return true for
Bar.class.isAssignableFrom(Foo.class). |
boolean |
TypeDescription.AbstractTypeDescription.OfSimpleType.isAssignableTo(TypeDescription typeDescription) |
boolean |
TypeDescription.ForLoadedType.isAssignableTo(TypeDescription typeDescription) |
boolean |
TypeDescription.ArrayProjection.isAssignableTo(TypeDescription typeDescription) |
boolean |
TypeDescription.isSamePackage(TypeDescription typeDescription)
Checks if two types are defined in the same package.
|
boolean |
TypeDescription.AbstractTypeDescription.isSamePackage(TypeDescription typeDescription) |
boolean |
TypeDescription.AbstractTypeDescription.isVisibleTo(TypeDescription typeDescription) |
static TypeDescription |
TypeDescription.ArrayProjection.of(TypeDescription componentType,
int arity)
Creates an array projection.
|
InstrumentedType |
InstrumentedType.withField(String internalName,
TypeDescription fieldType,
int modifiers)
Creates a new instrumented type that includes a new field.
|
InstrumentedType |
InstrumentedType.withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new instrumented type that includes a new method or constructor.
|
| Modifier and Type | Method and Description |
|---|---|
InstrumentedType |
InstrumentedType.withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new instrumented type that includes a new method or constructor.
|
InstrumentedType |
InstrumentedType.withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new instrumented type that includes a new method or constructor.
|
protected TypeList |
TypeList.ForLoadedType.wrap(List<TypeDescription> values) |
protected TypeList |
TypeList.Explicit.wrap(List<TypeDescription> values) |
| Constructor and Description |
|---|
ArrayProjection(TypeDescription componentType,
int arity)
Crrates a new array projection.
|
FieldToken(String name,
TypeDescription fieldType,
int modifiers)
Creates a new field for the enclosing instrumented type.
|
MethodToken(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new method or constructor for the enclosing instrumented type.
|
| Constructor and Description |
|---|
Explicit(List<? extends TypeDescription> typeDescriptions)
Creates an immutable wrapper.
|
MethodToken(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new method or constructor for the enclosing instrumented type.
|
MethodToken(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new method or constructor for the enclosing instrumented type.
|
| Modifier and Type | Method and Description |
|---|---|
Instrumentation.SpecialMethodInvocation |
TypeProxy.InvocationFactory.invoke(Instrumentation.Target instrumentationTarget,
TypeDescription proxiedType,
MethodDescription instrumentedMethod)
Creates a special method invocation to implement for a given method.
|
MethodLookupEngine.Finding |
TrivialType.process(TypeDescription typeDescription) |
MethodLookupEngine.Finding |
MethodCallProxy.ProxyMethodLookupEngine.process(TypeDescription typeDescription) |
| Constructor and Description |
|---|
Appender(TypeDescription instrumentedType)
Creates a new appender.
|
ForDefaultMethod(TypeDescription proxiedType,
Instrumentation.Target instrumentationTarget,
boolean serializableProxy)
Creates a new proxy creation for a default interface type proxy.
|
ForSuperMethodByConstructor(TypeDescription proxiedType,
Instrumentation.Target instrumentationTarget,
List<TypeDescription> constructorParameters,
boolean ignoreFinalizer,
boolean serializableProxy)
Creates a new stack operation for creating a type proxy by calling one of its constructors.
|
ForSuperMethodByReflectionFactory(TypeDescription proxiedType,
Instrumentation.Target instrumentationTarget,
boolean ignoreFinalizer,
boolean serializableProxy)
Creates a new stack operation for reflectively creating a type proxy for the given arguments.
|
TypeProxy(TypeDescription proxiedType,
Instrumentation.Target instrumentationTarget,
TypeProxy.InvocationFactory invocationFactory,
boolean ignoreFinalizer,
boolean serializableProxy)
Creates a new type proxy.
|
| Constructor and Description |
|---|
ForSuperMethodByConstructor(TypeDescription proxiedType,
Instrumentation.Target instrumentationTarget,
List<TypeDescription> constructorParameters,
boolean ignoreFinalizer,
boolean serializableProxy)
Creates a new stack operation for creating a type proxy by calling one of its constructors.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DeclaringFieldMatcher<T extends TypeDescription>
An element matcher that checks if a type description declares fields of a given property.
|
class |
DeclaringMethodMatcher<T extends TypeDescription>
An element matcher that checks if a type description declares methods of a given property.
|
class |
InheritedAnnotationMatcher<T extends TypeDescription>
An element matcher that matches the list of inherited annotations of a type description.
|
class |
SubTypeMatcher<T extends TypeDescription>
An element matcher that matches its argument for being another type's subtype.
|
class |
SuperTypeMatcher<T extends TypeDescription>
An element matcher that matches its argument for being another type's super type.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends TypeDescription> |
ElementMatchers.anyOf(Class<?>... value)
Creates a matcher that matches any of the given types as
TypeDescriptions
by the Object.equals(Object) method. |
static <T extends TypeDescription> |
ElementMatchers.declaresField(ElementMatcher<? super FieldDescription> fieldMatcher)
Matches a type by a another matcher that is applied on any of its declared fields.
|
static <T extends TypeDescription> |
ElementMatchers.declaresMethod(ElementMatcher<? super MethodDescription> methodMatcher)
Matches a type by a another matcher that is applied on any of its declared methods.
|
static <T extends TypeDescription> |
ElementMatchers.hasAnnotation(ElementMatcher<? super AnnotationDescription> matcher)
Matches a list of annotations by a given matcher on a type that declared these annotations or inherited them
from its super classes.
|
static <T extends TypeDescription> |
ElementMatchers.inheritsAnnotation(Class<?> type)
Matches any annotations by their type on a type that declared these annotations or inherited them from its
super classes.
|
static <T extends TypeDescription> |
ElementMatchers.inheritsAnnotation(ElementMatcher<? super TypeDescription> matcher)
Matches any annotations by a given matcher on a type that declared these annotations or inherited them from its
super classes.
|
static <T extends TypeDescription> |
ElementMatchers.inheritsAnnotation(TypeDescription typeDescription)
Matches any annotations by their type on a type that declared these annotations or inherited them from its
super classes.
|
static <T extends TypeDescription> |
ElementMatchers.is(Class<?> type)
Exactly matches a given type as a
TypeDescription. |
static <T extends TypeDescription> |
ElementMatchers.is(TypeDescription typeDescription)
Exactly matches a given
TypeDescription. |
static <T extends TypeDescription> |
ElementMatchers.isSubTypeOf(Class<?> type)
Matches any type description that is a subtype of the given type.
|
static <T extends TypeDescription> |
ElementMatchers.isSubTypeOf(TypeDescription typeDescription)
Matches any type description that is a subtype of the given type.
|
static <T extends TypeDescription> |
ElementMatchers.isSuperTypeOf(Class<?> type)
Matches any type description that is a super type of the given type.
|
static <T extends TypeDescription> |
ElementMatchers.isSuperTypeOf(TypeDescription typeDescription)
Matches any type description that is a super type of the given type.
|
static <T extends TypeDescription> |
ElementMatchers.noneOf(Class<?>... value)
Creates a matcher that matches none of the given types as
TypeDescriptions
by the Object.equals(Object) method. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends MethodDescription> |
ElementMatchers.canThrow(TypeDescription exceptionType)
Matches a
MethodDescription by its capability to throw a given
checked exception. |
static <T extends TypeDescription> |
ElementMatchers.inheritsAnnotation(TypeDescription typeDescription)
Matches any annotations by their type on a type that declared these annotations or inherited them from its
super classes.
|
static <T extends TypeDescription> |
ElementMatchers.is(TypeDescription typeDescription)
Exactly matches a given
TypeDescription. |
static <T extends AnnotatedElement> |
ElementMatchers.isAnnotatedWith(TypeDescription typeDescription)
Matches an
AnnotatedElement for declared annotations. |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredBy(TypeDescription type)
Matches a
ByteCodeElement for being declared by a given
TypeDescription. |
static <T extends MethodDescription> |
ElementMatchers.isGetter(TypeDescription typeDescription)
Matches any Java bean getter method which returns the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isSetter(TypeDescription typeDescription)
Matches any Java bean setter method which takes an argument the given type.
|
static <T extends TypeDescription> |
ElementMatchers.isSubTypeOf(TypeDescription typeDescription)
Matches any type description that is a subtype of the given type.
|
static <T extends TypeDescription> |
ElementMatchers.isSuperTypeOf(TypeDescription typeDescription)
Matches any type description that is a super type of the given type.
|
static <T extends ByteCodeElement> |
ElementMatchers.isVisibleTo(TypeDescription typeDescription)
Matches a
ByteCodeElement that is visible to a given
TypeDescription. |
static <T extends MethodDescription> |
ElementMatchers.returns(TypeDescription typeDescription)
Matches
MethodDescriptions that returns a given
TypeDescription. |
static <T extends MethodDescription> |
ElementMatchers.takesArguments(TypeDescription... typeDescription)
Matches a
MethodDescription by its exact parameter types. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends TypeDescription> |
ElementMatchers.inheritsAnnotation(ElementMatcher<? super TypeDescription> matcher)
Matches any annotations by a given matcher on a type that declared these annotations or inherited them from its
super classes.
|
static <T extends AnnotatedElement> |
ElementMatchers.isAnnotatedWith(ElementMatcher<? super TypeDescription> matcher)
Matches an
AnnotatedElement for declared annotations. |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredBy(ElementMatcher<? super TypeDescription> matcher)
Matches a
ByteCodeElement for being declared by a
TypeDescription that is matched by the given matcher. |
static <T extends MethodDescription> |
ElementMatchers.isGetter(ElementMatcher<? super TypeDescription> matcher)
Matches any Java bean getter method which returns an value with a type matches the supplied matcher.
|
static <T extends MethodDescription> |
ElementMatchers.isSetter(ElementMatcher<? super TypeDescription> matcher)
Matches any Java bean setter method which takes an argument that matches the supplied matcher.
|
static <T extends MethodDescription> |
ElementMatchers.returns(ElementMatcher<? super TypeDescription> matcher)
Matches
MethodDescriptions that matches a matched method's
return type. |
static <T extends MethodDescription> |
ElementMatchers.takesArguments(ElementMatcher<? super Iterable<? extends TypeDescription>> matchers)
Matches a
MethodDescription by applying an iterable collection
of element matcher on any parameter's TypeDescription. |
static <T extends MethodDescription> |
ElementMatchers.takesArguments(Iterable<? extends TypeDescription> typeDescriptions)
Matches a
MethodDescription by its exact parameter types. |
static <T extends MethodDescription> |
ElementMatchers.throwing(ElementMatcher<? super List<? extends TypeDescription>> exceptionMatcher)
Matches a
MethodDescription by its declared exceptions. |
| Constructor and Description |
|---|
SubTypeMatcher(TypeDescription typeDescription)
Creates a new matcher for matching its input for being a sub type of the given
typeDescription. |
SuperTypeMatcher(TypeDescription typeDescription)
Creates a new matcher for matching its input for being a super type of the given
typeDescription. |
VisibilityMatcher(TypeDescription typeDescription)
Creates a matcher that validates that a byte code element can be seen by a given type.
|
| Constructor and Description |
|---|
AnnotationTypeMatcher(ElementMatcher<? super TypeDescription> typeMatcher)
Creates a new matcher for an annotation description's type.
|
DeclaringTypeMatcher(ElementMatcher<? super TypeDescription> typeMatcher)
Creates a new matcher for the declaring type of an element.
|
MethodReturnTypeMatcher(ElementMatcher<? super TypeDescription> typeMatcher)
Creates a new matcher for a matched element's return type.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
TypePool.LazyTypeDescription
A type description that looks up any referenced
ByteCodeElements or
AnnotationDescriptions by querying a type pool
at lookup time. |
| Modifier and Type | Field and Description |
|---|---|
protected static Map<String,TypeDescription> |
TypePool.AbstractBase.PRIMITIVE_TYPES
A map of primitive types by their name.
|
| Modifier and Type | Method and Description |
|---|---|
TypeDescription |
TypePool.LazyTypeDescription.LazyTypeList.get(int index) |
TypeDescription |
TypePool.LazyTypeDescription.getDeclaringType() |
TypeDescription |
TypePool.LazyTypeDescription.getEnclosingType() |
TypeDescription |
TypePool.LazyTypeDescription.DeclarationContext.getEnclosingType(TypePool typePool)
Returns the enclosing type or
null if no such type exists. |
TypeDescription |
TypePool.LazyTypeDescription.DeclarationContext.SelfDeclared.getEnclosingType(TypePool typePool) |
TypeDescription |
TypePool.LazyTypeDescription.DeclarationContext.DeclaredInType.getEnclosingType(TypePool typePool) |
TypeDescription |
TypePool.LazyTypeDescription.DeclarationContext.DeclaredInMethod.getEnclosingType(TypePool typePool) |
TypeDescription |
TypePool.LazyTypeDescription.AnnotationValue.ForEnumeration.LazyEnumerationValue.getEnumerationType() |
TypeDescription |
TypePool.LazyTypeDescription.getSupertype() |
TypeDescription |
TypePool.Resolution.resolve()
Resolves this resolution to the represented type description.
|
TypeDescription |
TypePool.Resolution.Simple.resolve() |
TypeDescription |
TypePool.Resolution.Illegal.resolve() |
TypeDescription |
TypePool.AbstractBase.ArrayTypeResolution.resolve() |
TypeDescription |
TypePool.LazyTypeDescription.AnnotationValue.ForType.resolve(TypePool typePool) |
protected TypeDescription |
TypePool.Default.TypeExtractor.toTypeDescription()
Creates a type description from all data that is currently collected.
|
| Modifier and Type | Method and Description |
|---|---|
protected TypeList |
TypePool.LazyTypeDescription.LazyTypeList.wrap(List<TypeDescription> values) |
| Constructor and Description |
|---|
Simple(TypeDescription typeDescription)
Creates a new successful resolution of a given type description.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends TypeDescription> |
ByteBuddyCommons.isAnnotation(T typeDescriptions)
Validates if a type is an annotation type.
|
static <T extends TypeDescription> |
ByteBuddyCommons.isExtendable(T typeDescription)
Validates that a type can be implemented, i.e.
|
static <T extends Iterable<? extends TypeDescription>> |
ByteBuddyCommons.isInterface(T typeDescriptions)
Validates if a list of type only contains interfaces.
|
static <T extends TypeDescription> |
ByteBuddyCommons.isInterface(T typeDescription)
Validates if a type represents an interface.
|
static <T extends TypeDescription> |
ByteBuddyCommons.isInterface(T[] typeDescription)
Validates if an array of type only contains interfaces.
|
static <T extends Iterable<? extends TypeDescription>> |
ByteBuddyCommons.isThrowable(T types)
Checks if given types can all be thrown, i.e.
|
static <T extends Iterable<? extends TypeDescription>> |
ByteBuddyCommons.nonVoid(T typeDescriptions)
Validates that type descriptions do not represent the
void type. |
static <T extends TypeDescription> |
ByteBuddyCommons.nonVoid(T typeDescription)
Validates that a type description is not representing the
void type. |
static <T extends List<? extends TypeDescription>> |
ByteBuddyCommons.uniqueTypes(T typeDescriptions)
Validates that there are no duplicates for a list of type descriptions.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends TypeDescription> |
ByteBuddyCommons.isInterface(T[] typeDescription)
Validates if an array of type only contains interfaces.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends TypeDescription> |
ByteBuddyCommons.isInterface(T[] typeDescription)
Validates if an array of type only contains interfaces.
|
Copyright © 2014. All rights reserved.