protected abstract static class ByteBuddy.Proxy extends ByteBuddy
ByteBuddy
configuration.ByteBuddy.Definable<T>, ByteBuddy.EnumerationImplementation, ByteBuddy.MatchedMethodInterception, ByteBuddy.MethodAnnotationTarget, ByteBuddy.MethodInterceptable, ByteBuddy.OptionalMethodInterception, ByteBuddy.Proxy
auxiliaryTypeNamingStrategy, BYTE_BUDDY_DEFAULT_PREFIX, BYTE_BUDDY_DEFAULT_SUFFIX, classFileVersion, classVisitorWrapperChain, defaultFieldAttributeAppenderFactory, defaultMethodAttributeAppenderFactory, ignoredMethods, interfaceTypes, methodGraphCompiler, methodRegistry, modifiers, namingStrategy, typeAttributeAppender
Modifier | Constructor and Description |
---|---|
protected |
Proxy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new proxy configuration for
ByteBuddy . |
Modifier and Type | Method and Description |
---|---|
ByteBuddy.MatchedMethodInterception |
constructor(ElementMatcher<? super MethodDescription> methodMatcher)
Intercepts a given constructor selection.
|
AuxiliaryType.NamingStrategy |
getAuxiliaryTypeNamingStrategy()
Returns the used naming strategy for auxiliary types.
|
ClassFileVersion |
getClassFileVersion()
Returns the class file version that is defined for the current configuration.
|
ClassVisitorWrapper.Chain |
getClassVisitorWrapperChain()
Returns the class visitor wrapper chain for the current configuration.
|
FieldAttributeAppender.Factory |
getDefaultFieldAttributeAppenderFactory()
Returns the default field attribute appender factory which is applied to any field that is defined
for implementations that are applied by this configuration.
|
MethodAttributeAppender.Factory |
getDefaultMethodAttributeAppenderFactory()
Returns the default method attribute appender factory which is applied to any method that is defined
or intercepted for implementations that are applied by this configuration.
|
ElementMatcher<? super MethodDescription> |
getIgnoredMethods()
Returns the matcher for the ignored methods for the current configuration.
|
List<TypeDescription> |
getInterfaceTypes()
Returns the naming strategy for the current configuration.
|
MethodGraph.Compiler |
getMethodGraphCompiler()
Returns the method graph compiler that is used.
|
MethodRegistry |
getMethodRegistry()
Returns the method registry for the current configuration.
|
ByteBuddy.Definable<Integer> |
getModifiers()
Returns the modifiers to apply to any type that is generated by this configuration.
|
NamingStrategy.Unbound |
getNamingStrategy()
Returns the naming strategy for the current configuration.
|
TypeAttributeAppender |
getTypeAttributeAppender()
Returns the type attribute appender factory to apply to any type that is generated by this configuration.
|
ByteBuddy.MatchedMethodInterception |
invokable(ElementMatcher<? super MethodDescription> methodMatcher)
Intercepts a given selection of byte code level methods, i.e.
|
ByteBuddy.MatchedMethodInterception |
invokable(LatentMethodMatcher methodMatcher)
Intercepts a given selection of byte code level methods, i.e.
|
DynamicType.Builder<? extends Annotation> |
makeAnnotation()
Creates a dynamic type builder for a new annotation type.
|
DynamicType.Builder<? extends Enum<?>> |
makeEnumeration(Collection<? extends String> values)
Creates a new enumeration type.
|
DynamicType.Builder<? extends Enum<?>> |
makeEnumeration(String... value)
Creates a new enumeration type.
|
DynamicType.Builder<?> |
makeInterface()
Creates a dynamic type builder for an interface that does not extend any interfaces.
|
DynamicType.Builder<?> |
makeInterface(Class<?>... type)
Creates a dynamic type builder for an interface that extends a number of given interfaces.
|
<T> DynamicType.Builder<T> |
makeInterface(Class<T> type)
Creates a dynamic type builder for an interface that extends the given interface.
|
DynamicType.Builder<?> |
makeInterface(Collection<? extends TypeDescription> typeDescriptions)
Creates a dynamic type builder for an interface that extends a number of given interfaces.
|
DynamicType.Builder<?> |
makeInterface(Iterable<? extends Class<?>> types)
Creates a dynamic type builder for an interface that extends a number of given interfaces.
|
DynamicType.Builder<?> |
makeInterface(TypeDescription... typeDescription)
Creates a dynamic type builder for an interface that extends a number of given interfaces.
|
DynamicType.Builder<?> |
makePackage(String name)
Creates a new Java package.
|
protected abstract ByteBuddy |
materialize()
Materializes the current extended configuration.
|
ByteBuddy.MatchedMethodInterception |
method(ElementMatcher<? super MethodDescription> methodMatcher)
Intercepts a given method selection.
|
<T> DynamicType.Builder<T> |
rebase(Class<T> levelType)
Creates a dynamic type by weaving any changes into an already defined level type.
|
<T> DynamicType.Builder<T> |
rebase(Class<T> levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type by weaving any changes into an already defined level type.
|
<T> DynamicType.Builder<T> |
rebase(Class<T> levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a dynamic type by weaving any changes into an already defined level type.
|
DynamicType.Builder<?> |
rebase(Package aPackage,
ClassFileLocator classFileLocator)
Rebases the given the package.
|
DynamicType.Builder<?> |
rebase(PackageDescription packageDescription,
ClassFileLocator classFileLocator)
Rebases the given the package.
|
<T> DynamicType.Builder<T> |
rebase(TypeDescription levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type by weaving any changes into an already defined level type.
|
<T> DynamicType.Builder<T> |
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> |
redefine(Class<T> levelType)
Creates a dynamic type builder for redefining of the given type.
|
<T> DynamicType.Builder<T> |
redefine(Class<T> levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type builder for redefining of the given type.
|
<T> DynamicType.Builder<T> |
redefine(TypeDescription levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type builder for redefining of the given type.
|
<T> DynamicType.Builder<T> |
subclass(Class<T> superType)
Creates a dynamic type builder that creates a subclass of a given loaded type where the subclass
is created by the
ConstructorStrategy.Default.IMITATE_SUPER_TYPE
strategy. |
<T> DynamicType.Builder<T> |
subclass(Class<T> superType,
ConstructorStrategy constructorStrategy)
Creates a dynamic type builder that creates a subclass of a given loaded type.
|
<T> DynamicType.Builder<T> |
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> |
subclass(TypeDescription superType,
ConstructorStrategy constructorStrategy)
Creates a dynamic type builder that creates a subclass of a given type description.
|
ByteBuddy |
withAttribute(TypeAttributeAppender typeAttributeAppender)
Defines a new type attribute appender for this configuration that replaces the currently defined type
attribute appender.
|
ByteBuddy |
withClassFileVersion(ClassFileVersion classFileVersion)
Defines a new class file version for this configuration.
|
ByteBuddy |
withClassVisitor(ClassVisitorWrapper classVisitorWrapper)
Defines a new class visitor to be appended to the current collection of
ClassVisitor s
that are to be applied onto any creation process of a dynamic type. |
ByteBuddy |
withDefaultFieldAttributeAppender(FieldAttributeAppender.Factory attributeAppenderFactory)
Defines a new default field attribute appender factory that is applied onto any field.
|
ByteBuddy |
withDefaultMethodAttributeAppender(MethodAttributeAppender.Factory attributeAppenderFactory)
Defines a new default method attribute appender factory that is applied onto any method.
|
ByteBuddy |
withIgnoredMethods(ElementMatcher<? super MethodDescription> ignoredMethods)
Defines a new method matcher for methods that are ignored by any dynamic type that is created by this
configuration which will replace the current configuration.
|
ByteBuddy.OptionalMethodInterception |
withImplementing(Class<?>... type)
Defines all dynamic types that are created by this configuration to implement the given interfaces.
|
ByteBuddy.OptionalMethodInterception |
withImplementing(Collection<? extends TypeDescription> types)
Defines all dynamic types that are created by this configuration to implement the given interfaces.
|
ByteBuddy.OptionalMethodInterception |
withImplementing(Iterable<? extends Class<?>> types)
Defines all dynamic types that are created by this configuration to implement the given interfaces.
|
ByteBuddy.OptionalMethodInterception |
withImplementing(TypeDescription... type)
Defines all dynamic types that are created by this configuration to implement the given interfaces.
|
ByteBuddy |
withMethodGraphCompiler(MethodGraph.Compiler methodGraphCompiler)
Defines a new method graph compiler to be used for extracting a type's invokable methods.
|
ByteBuddy |
withModifiers(ModifierContributor.ForType... modifierContributor)
Defines a new modifier contributors for this configuration that replaces the currently defined modifier
contributes which might currently be implicit.
|
ByteBuddy |
withNamingStrategy(AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy)
Defines a naming strategy for auxiliary types.
|
ByteBuddy |
withNamingStrategy(NamingStrategy.Unbound namingStrategy)
Defines a new naming strategy for this configuration.
|
ByteBuddy |
withNamingStrategy(NamingStrategy namingStrategy)
Defines a new naming strategy for this configuration.
|
ByteBuddy |
withTypeAnnotation(Annotation... annotation)
Defines a new type annotation for this configuration that replaces the currently defined type
attribute appender.
|
ByteBuddy |
withTypeAnnotation(AnnotationDescription... annotation)
Defines a new type annotation for this configuration that replaces the currently defined type
attribute appender.
|
ByteBuddy |
withTypeAnnotation(Collection<? extends AnnotationDescription> annotations)
Defines a new type annotation for this configuration that replaces the currently defined type
attribute appender.
|
ByteBuddy |
withTypeAnnotation(Iterable<? extends Annotation> annotations)
Defines a new type annotation for this configuration that replaces the currently defined type
attribute appender.
|
protected Proxy(ClassFileVersion classFileVersion, NamingStrategy.Unbound namingStrategy, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, List<TypeDescription> interfaceTypes, ElementMatcher<? super MethodDescription> ignoredMethods, ClassVisitorWrapper.Chain classVisitorWrapperChain, MethodRegistry methodRegistry, ByteBuddy.Definable<Integer> modifiers, TypeAttributeAppender typeAttributeAppender, MethodGraph.Compiler methodGraphCompiler, FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory, MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
ByteBuddy
.classFileVersion
- The currently defined class file version.namingStrategy
- The currently defined naming strategy.auxiliaryTypeNamingStrategy
- The currently defined naming strategy for auxiliary types.interfaceTypes
- The currently defined collection of interfaces to be
implemented by any dynamically created type.ignoredMethods
- The methods to always be ignored.
implementation process.classVisitorWrapperChain
- The class visitor wrapper chain to be applied to any
implementation process.methodRegistry
- The currently valid method registry.modifiers
- The modifiers to define for any implementation process.typeAttributeAppender
- The type attribute appender to apply to any implementation
process.methodGraphCompiler
- The method graph compiler to use.defaultFieldAttributeAppenderFactory
- The field attribute appender to apply as a default for any
field definition.defaultMethodAttributeAppenderFactory
- The method attribute appender to apply as a default for any
method definition or implementation.public ClassFileVersion getClassFileVersion()
ByteBuddy
getClassFileVersion
in class ByteBuddy
public NamingStrategy.Unbound getNamingStrategy()
ByteBuddy
getNamingStrategy
in class ByteBuddy
public List<TypeDescription> getInterfaceTypes()
ByteBuddy
getInterfaceTypes
in class ByteBuddy
public ElementMatcher<? super MethodDescription> getIgnoredMethods()
ByteBuddy
getIgnoredMethods
in class ByteBuddy
public ClassVisitorWrapper.Chain getClassVisitorWrapperChain()
ByteBuddy
getClassVisitorWrapperChain
in class ByteBuddy
public MethodRegistry getMethodRegistry()
ByteBuddy
getMethodRegistry
in class ByteBuddy
public ByteBuddy.Definable<Integer> getModifiers()
ByteBuddy
getModifiers
in class ByteBuddy
public MethodGraph.Compiler getMethodGraphCompiler()
ByteBuddy
getMethodGraphCompiler
in class ByteBuddy
public TypeAttributeAppender getTypeAttributeAppender()
ByteBuddy
getTypeAttributeAppender
in class ByteBuddy
public FieldAttributeAppender.Factory getDefaultFieldAttributeAppenderFactory()
ByteBuddy
getDefaultFieldAttributeAppenderFactory
in class ByteBuddy
public MethodAttributeAppender.Factory getDefaultMethodAttributeAppenderFactory()
ByteBuddy
getDefaultMethodAttributeAppenderFactory
in class ByteBuddy
public AuxiliaryType.NamingStrategy getAuxiliaryTypeNamingStrategy()
ByteBuddy
getAuxiliaryTypeNamingStrategy
in class ByteBuddy
public <T> DynamicType.Builder<T> subclass(Class<T> superType)
ByteBuddy
ConstructorStrategy.Default.IMITATE_SUPER_TYPE
strategy.subclass
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.superType
- The type or interface to be extended or implemented by the dynamic type.public <T> DynamicType.Builder<T> subclass(Class<T> superType, ConstructorStrategy constructorStrategy)
ByteBuddy
subclass
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.superType
- The type or interface to be extended or implemented by the dynamic type.constructorStrategy
- The constructor strategy to apply.public <T> DynamicType.Builder<T> subclass(TypeDescription superType)
ByteBuddy
ConstructorStrategy.Default.IMITATE_SUPER_TYPE
strategy.subclass
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.superType
- The type or interface to be extended or implemented by the dynamic type.public <T> DynamicType.Builder<T> subclass(TypeDescription superType, ConstructorStrategy constructorStrategy)
ByteBuddy
subclass
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.superType
- The type or interface to be extended or implemented by the dynamic type.constructorStrategy
- The constructor strategy to apply.public <T> DynamicType.Builder<T> redefine(Class<T> levelType)
ByteBuddy
Creates a dynamic type builder for redefining of the given type. The given class must be found on the
class path or by the class's ClassLoader
. Otherwise, the class file to the redefined class
must be located explicitly by providing a locator by
ByteBuddy.redefine(Class, net.bytebuddy.dynamic.ClassFileLocator)
.
Note: It is possible to experience unexpected errors in case that the provided levelType
and the
corresponding class file get out of sync, i.e. a type is redefined several times without providing an updated
version of the class file.
public <T> DynamicType.Builder<T> redefine(Class<T> levelType, ClassFileLocator classFileLocator)
ByteBuddy
Creates a dynamic type builder for redefining of the given type.
Note: It is possible to experience unexpected errors in case that the provided levelType
and the
corresponding class file get out of sync, i.e. a type is redefined several times without providing an updated
version of the class file.
redefine
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.levelType
- The type to redefine.classFileLocator
- A locator for finding a class file that represents a type.public <T> DynamicType.Builder<T> redefine(TypeDescription levelType, ClassFileLocator classFileLocator)
ByteBuddy
Creates a dynamic type builder for redefining of the given type.
Note: It is possible to experience unexpected errors in case that the provided levelType
and the
corresponding class file get out of sync, i.e. a type is redefined several times without providing an updated
version of the class file.
redefine
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.levelType
- The type to redefine.classFileLocator
- A locator for finding a class file that represents a type.public <T> DynamicType.Builder<T> rebase(Class<T> levelType)
ByteBuddy
Creates a dynamic type by weaving any changes into an already defined level type. The rebased type is
created by adding methods to the level type where the original method implementations are copied to
renamed, private methods within the created dynamic type and therefore remain invokable as super method calls.
The result is a rebased type with subclass semantics. The given class must be found on the class path or
by the provided class's ClassLoader
. Otherwise, the class file to the redefined class
must be located explicitly by providing a locator by
ByteBuddy.rebase(Class, net.bytebuddy.dynamic.ClassFileLocator)
.
Note: It is possible to experience unexpected errors in case that the provided levelType
and the
corresponding class file get out of sync, i.e. a type is rebased several times without updating the class file.
public <T> DynamicType.Builder<T> rebase(Class<T> levelType, ClassFileLocator classFileLocator)
ByteBuddy
Creates a dynamic type by weaving any changes into an already defined level type. The rebased type is created by adding methods to the level type where the original method implementations are copied to renamed, private methods within the created dynamic type and therefore remain invokable as super method calls. The result is a rebased type with subclass semantics.
Note: It is possible to experience unexpected errors in case that the provided levelType
and the
corresponding class file get out of sync, i.e. a type is rebased several times without updating the class file.
rebase
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.levelType
- The type which is to be rebased.classFileLocator
- A locator for finding a class file that represents a type.public <T> DynamicType.Builder<T> rebase(Class<T> levelType, ClassFileLocator classFileLocator, MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
ByteBuddy
Creates a dynamic type by weaving any changes into an already defined level type. The rebased type is created by adding methods to the level type where the original method implementations are copied to renamed, private methods within the created dynamic type and therefore remain invokable as super method calls. The result is a rebased type with subclass semantics.
Note: It is possible to experience unexpected errors in case that the provided levelType
and the
corresponding class file get out of sync, i.e. a type is rebased several times without updating the class file.
rebase
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.levelType
- The type which is to be rebased.classFileLocator
- A locator for finding a class file that represents a type.methodNameTransformer
- The method name transformer that is used for rebasing methods.public <T> DynamicType.Builder<T> rebase(TypeDescription levelType, ClassFileLocator classFileLocator)
ByteBuddy
Creates a dynamic type by weaving any changes into an already defined level type. The rebased type is created by adding methods to the level type where the original method implementations are copied to renamed, private methods within the created dynamic type and therefore remain invokable as super method calls. The result is a rebased type with subclass semantics.
Note: It is possible to experience unexpected errors in case that the provided levelType
and the
corresponding class file get out of sync, i.e. a type is rebased several times without updating the class file.
rebase
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.levelType
- The type which is to be rebased.classFileLocator
- A locator for finding a class file that represents a type.public <T> DynamicType.Builder<T> rebase(TypeDescription levelType, ClassFileLocator classFileLocator, MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
ByteBuddy
Creates a dynamic type by weaving any changes into an already defined level type. The rebased type is created by adding methods to the level type where the original method implementations are copied to renamed, private methods within the created dynamic type and therefore remain invokable as super method calls. The result is a rebased type with subclass semantics.
Note: It is possible to experience unexpected errors in case that the provided levelType
and the
corresponding class file get out of sync, i.e. a type is rebased several times without updating the class file.
rebase
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.levelType
- The type which is to be rebased.classFileLocator
- A locator for finding a class file that represents a type.methodNameTransformer
- The method name transformer that is used for rebasing methods.public ByteBuddy withClassFileVersion(ClassFileVersion classFileVersion)
ByteBuddy
withClassFileVersion
in class ByteBuddy
classFileVersion
- The class file version to define for this configuration.public ByteBuddy withNamingStrategy(NamingStrategy.Unbound namingStrategy)
ByteBuddy
withNamingStrategy
in class ByteBuddy
namingStrategy
- The unbound naming strategy to apply to the current configuration.public ByteBuddy withNamingStrategy(NamingStrategy namingStrategy)
ByteBuddy
withNamingStrategy
in class ByteBuddy
namingStrategy
- The naming strategy to apply to the current configuration.public ByteBuddy withNamingStrategy(AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy)
ByteBuddy
withNamingStrategy
in class ByteBuddy
auxiliaryTypeNamingStrategy
- The naming strategy to use.public ByteBuddy withModifiers(ModifierContributor.ForType... modifierContributor)
ByteBuddy
withModifiers
in class ByteBuddy
modifierContributor
- The modifier contributors to define explicitly for this configuration.public ByteBuddy withAttribute(TypeAttributeAppender typeAttributeAppender)
ByteBuddy
withAttribute
in class ByteBuddy
typeAttributeAppender
- The type attribute appender to define for this configuration.public ByteBuddy withTypeAnnotation(Annotation... annotation)
ByteBuddy
withTypeAnnotation
in class ByteBuddy
annotation
- The type annotations to define for this configuration.public ByteBuddy withTypeAnnotation(Iterable<? extends Annotation> annotations)
ByteBuddy
withTypeAnnotation
in class ByteBuddy
annotations
- The type annotations to define for this configuration.public ByteBuddy withTypeAnnotation(Collection<? extends AnnotationDescription> annotations)
ByteBuddy
withTypeAnnotation
in class ByteBuddy
annotations
- The type annotations to define for this configuration.public ByteBuddy.OptionalMethodInterception withImplementing(Class<?>... type)
ByteBuddy
withImplementing
in class ByteBuddy
type
- The interface types to implement.public ByteBuddy.OptionalMethodInterception withImplementing(Iterable<? extends Class<?>> types)
ByteBuddy
withImplementing
in class ByteBuddy
types
- The interface types to implement.public ByteBuddy.OptionalMethodInterception withImplementing(TypeDescription... type)
ByteBuddy
withImplementing
in class ByteBuddy
type
- The interface types to implement.public ByteBuddy.OptionalMethodInterception withImplementing(Collection<? extends TypeDescription> types)
ByteBuddy
withImplementing
in class ByteBuddy
types
- The interface types to implement.public ByteBuddy withIgnoredMethods(ElementMatcher<? super MethodDescription> ignoredMethods)
ByteBuddy
withIgnoredMethods
in class ByteBuddy
ignoredMethods
- The methods to always be ignored for any instrumentation.public ByteBuddy withClassVisitor(ClassVisitorWrapper classVisitorWrapper)
ByteBuddy
ClassVisitor
s
that are to be applied onto any creation process of a dynamic type.withClassVisitor
in class ByteBuddy
classVisitorWrapper
- The class visitor wrapper to ba appended to the current chain of class visitor wrappers.public ByteBuddy withMethodGraphCompiler(MethodGraph.Compiler methodGraphCompiler)
ByteBuddy
withMethodGraphCompiler
in class ByteBuddy
methodGraphCompiler
- The method graph compiler to use.public ByteBuddy withDefaultFieldAttributeAppender(FieldAttributeAppender.Factory attributeAppenderFactory)
ByteBuddy
withDefaultFieldAttributeAppender
in class ByteBuddy
attributeAppenderFactory
- The attribute appender factory that is applied as a default on any
field that is created by a dynamic type that is created with this
configuration.public ByteBuddy withDefaultMethodAttributeAppender(MethodAttributeAppender.Factory attributeAppenderFactory)
ByteBuddy
withDefaultMethodAttributeAppender
in class ByteBuddy
attributeAppenderFactory
- The attribute appender factory that is applied as a default on any
method that is created or intercepted by a dynamic type that is created
with this configuration.public ByteBuddy.MatchedMethodInterception invokable(ElementMatcher<? super MethodDescription> methodMatcher)
ByteBuddy
public DynamicType.Builder<?> makeInterface()
ByteBuddy
makeInterface
in class ByteBuddy
public <T> DynamicType.Builder<T> makeInterface(Class<T> type)
ByteBuddy
makeInterface
in class ByteBuddy
T
- The most specific known type that the created dynamic type represents.type
- The interface to extend.public DynamicType.Builder<?> makeInterface(Class<?>... type)
ByteBuddy
makeInterface
in class ByteBuddy
type
- The interface types to extend.public DynamicType.Builder<?> makeInterface(TypeDescription... typeDescription)
ByteBuddy
makeInterface
in class ByteBuddy
typeDescription
- Descriptions of the interface types to extend.public DynamicType.Builder<?> makeInterface(Iterable<? extends Class<?>> types)
ByteBuddy
makeInterface
in class ByteBuddy
types
- The interface types to extend.public DynamicType.Builder<?> makeInterface(Collection<? extends TypeDescription> typeDescriptions)
ByteBuddy
makeInterface
in class ByteBuddy
typeDescriptions
- The interface types to extend.public DynamicType.Builder<? extends Annotation> makeAnnotation()
ByteBuddy
makeAnnotation
in class ByteBuddy
public DynamicType.Builder<? extends Enum<?>> makeEnumeration(String... value)
ByteBuddy
makeEnumeration
in class ByteBuddy
value
- The enumeration values to define.public DynamicType.Builder<? extends Enum<?>> makeEnumeration(Collection<? extends String> values)
ByteBuddy
makeEnumeration
in class ByteBuddy
values
- The enumeration values to define.public DynamicType.Builder<?> makePackage(String name)
ByteBuddy
makePackage
in class ByteBuddy
name
- The name of the package.public DynamicType.Builder<?> rebase(Package aPackage, ClassFileLocator classFileLocator)
ByteBuddy
public DynamicType.Builder<?> rebase(PackageDescription packageDescription, ClassFileLocator classFileLocator)
ByteBuddy
public ByteBuddy withTypeAnnotation(AnnotationDescription... annotation)
ByteBuddy
withTypeAnnotation
in class ByteBuddy
annotation
- The type annotations to define for this configuration.public ByteBuddy.MatchedMethodInterception invokable(LatentMethodMatcher methodMatcher)
ByteBuddy
public ByteBuddy.MatchedMethodInterception method(ElementMatcher<? super MethodDescription> methodMatcher)
ByteBuddy
public ByteBuddy.MatchedMethodInterception constructor(ElementMatcher<? super MethodDescription> methodMatcher)
ByteBuddy
constructor
in class ByteBuddy
methodMatcher
- The method matcher representing all constructors to intercept.protected abstract ByteBuddy materialize()
Copyright © 2014–2015. All rights reserved.