Package | Description |
---|---|
net.bytebuddy |
Byte Buddy is a library for creating Java classes at runtime of a Java program.
|
net.bytebuddy.description.annotation |
Contains descriptions of annotations and annotation values.
|
net.bytebuddy.description.field |
Contains descriptions of Java fields.
|
net.bytebuddy.description.method |
Contains descriptions of Java methods and constructors as well as their parameters.
|
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.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.implementation.attribute |
All types and classes in this package are responsible for writing attributes for a given Java byte code element,
i.e.
|
net.bytebuddy.implementation.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.matcher |
Contains an API for matching Java byte code entities.
|
net.bytebuddy.pool |
Classes of this package allow for the creating
TypeDescription s without
loading any classes. |
Modifier and Type | Method and Description |
---|---|
ByteBuddy.MethodAnnotationTarget |
ByteBuddy.MethodAnnotationTarget.annotateMethod(AnnotationDescription... annotation)
Defines an method annotation for the currently selected methods.
|
ByteBuddy.MethodAnnotationTarget |
ByteBuddy.MethodAnnotationTarget.annotateParameter(int parameterIndex,
AnnotationDescription... annotation)
Defines an method annotation for a parameter of the currently selected methods.
|
ByteBuddy |
ByteBuddy.withTypeAnnotation(AnnotationDescription... annotation)
Defines a new type annotation for this configuration that replaces the currently defined type
attribute appender.
|
ByteBuddy |
ByteBuddy.Proxy.withTypeAnnotation(AnnotationDescription... annotation) |
Modifier and Type | Method and Description |
---|---|
ByteBuddy.MethodAnnotationTarget |
ByteBuddy.MethodAnnotationTarget.annotateMethod(Collection<? extends AnnotationDescription> annotations)
Defines an method annotation for the currently selected methods.
|
ByteBuddy.MethodAnnotationTarget |
ByteBuddy.MethodAnnotationTarget.annotateParameter(int parameterIndex,
Collection<? extends AnnotationDescription> annotations)
Defines an method annotation for a parameter of the currently selected methods.
|
ByteBuddy |
ByteBuddy.withTypeAnnotation(Collection<? extends AnnotationDescription> annotations)
Defines a new type annotation for this configuration that replaces the currently defined type
attribute appender.
|
ByteBuddy |
ByteBuddy.Proxy.withTypeAnnotation(Collection<? extends AnnotationDescription> annotations) |
Modifier and Type | Interface and Description |
---|---|
static interface |
AnnotationDescription.Loadable<S extends Annotation>
An annotation description that is linked to a given loaded annotation type which allows its representation
as a fully loaded instance.
|
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationDescription.AbstractBase
An adapter implementation of an annotation.
|
static class |
AnnotationDescription.AbstractBase.ForPrepared<S extends Annotation>
An abstract implementation of a loadable annotation description.
|
static class |
AnnotationDescription.ForLoadedAnnotation<S extends Annotation>
A description of an already loaded annotation.
|
static class |
AnnotationDescription.Latent
A latent description of an annotation value that is defined explicitly.
|
protected class |
AnnotationDescription.Latent.Loadable<S extends Annotation>
A loadable annotation description of a latent annotation description.
|
Modifier and Type | Method and Description |
---|---|
AnnotationDescription |
AnnotationList.ForLoadedAnnotation.get(int index) |
AnnotationDescription |
AnnotationList.Explicit.get(int index) |
AnnotationDescription |
AnnotationDescription.Builder.make()
Creates an annotation description for the values that were defined for this builder.
|
AnnotationDescription |
AnnotationDescription.AnnotationValue.ForAnnotation.resolve() |
Modifier and Type | Method and Description |
---|---|
static <V extends Annotation> |
AnnotationDescription.AnnotationValue.ForAnnotation.of(TypeDescription annotationType,
Map<String,AnnotationDescription.AnnotationValue<?,?>> annotationValues)
Creates an annotation value instance for describing the given annotation type and values.
|
Modifier and Type | Method and Description |
---|---|
AnnotationDescription.Builder |
AnnotationDescription.Builder.define(String property,
AnnotationDescription annotationDescription)
Returns a builder with the additional annotation property.
|
AnnotationDescription.Builder |
AnnotationDescription.Builder.defineAnnotationArray(String property,
TypeDescription annotationType,
AnnotationDescription... annotationDescription)
Returns a builder with the additional annotation array property.
|
static <W extends Annotation> |
AnnotationDescription.AnnotationValue.ForComplexArray.of(TypeDescription annotationType,
AnnotationDescription[] annotationDescription)
Creates a new complex array of annotation descriptions.
|
Modifier and Type | Method and Description |
---|---|
static List<AnnotationList> |
AnnotationList.Explicit.asList(List<? extends List<? extends AnnotationDescription>> annotations)
Creates a list of annotation lists for a given multidimensional list of annotation descriptions.
|
protected AnnotationList |
AnnotationList.AbstractBase.wrap(List<AnnotationDescription> values) |
Constructor and Description |
---|
ForAnnotation(AnnotationDescription annotationDescription)
Creates a new annotation value for a given annotation description.
|
Constructor and Description |
---|
Explicit(List<? extends AnnotationDescription> annotationDescriptions)
Creates a new list of annotation descriptions.
|
Constructor and Description |
---|
Latent(TypeDescription declaringType,
String fieldName,
int modifiers,
GenericTypeDescription fieldType,
List<? extends AnnotationDescription> declaredAnnotations)
Creates a new latent field description.
|
Token(String name,
int modifiers,
GenericTypeDescription type,
List<? extends AnnotationDescription> annotations)
Creates a new field token.
|
Constructor and Description |
---|
Latent(MethodDescription.InDefinedShape declaringMethod,
GenericTypeDescription parameterType,
List<? extends AnnotationDescription> declaredAnnotations,
String name,
Integer modifiers,
int index,
int offset)
Creates a latent parameter description.
|
Latent(TypeDescription declaringType,
String internalName,
int modifiers,
List<? extends GenericTypeDescription> typeVariables,
GenericTypeDescription returnType,
List<? extends ParameterDescription.Token> parameterTokens,
List<? extends GenericTypeDescription> exceptionTypes,
List<? extends AnnotationDescription> declaredAnnotations,
Object defaultValue)
Creates a new latent method description.
|
Token(GenericTypeDescription typeDescription,
List<? extends AnnotationDescription> annotationDescriptions)
Creates a new parameter token without an explicit name or an explicit modifier.
|
Token(GenericTypeDescription typeDescription,
List<? extends AnnotationDescription> annotationDescriptions,
String name,
Integer modifiers)
Creates a new parameter token.
|
Token(String internalName,
int modifiers,
List<GenericTypeDescription> typeVariables,
GenericTypeDescription returnType,
List<? extends ParameterDescription.Token> parameterTokens,
List<? extends GenericTypeDescription> exceptionTypes,
List<? extends AnnotationDescription> annotations,
Object defaultValue)
Creates a new token for a method description.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.FieldAnnotationTarget<S> |
DynamicType.Builder.FieldAnnotationTarget.annotateField(AnnotationDescription... annotation)
Defines annotations to be added to the currently selected field.
|
DynamicType.Builder.FieldAnnotationTarget<S> |
DynamicType.Builder.AbstractBase.DefaultFieldValueTarget.annotateField(AnnotationDescription... annotation) |
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.MethodAnnotationTarget.annotateMethod(AnnotationDescription... annotation)
Defines annotations to be added to the currently selected method.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.AbstractBase.DefaultMethodAnnotationTarget.annotateMethod(AnnotationDescription... annotation) |
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.MethodAnnotationTarget.annotateParameter(int parameterIndex,
AnnotationDescription... annotation)
Defines annotations to be added to a parameter of the currently selected methods.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.AbstractBase.DefaultMethodAnnotationTarget.annotateParameter(int parameterIndex,
AnnotationDescription... annotation) |
DynamicType.Builder<T> |
DynamicType.Builder.annotateType(AnnotationDescription... annotation)
Adds annotations to the currently constructed type.
|
DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.annotateType(AnnotationDescription... annotation) |
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.annotateType(AnnotationDescription... annotation) |
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.FieldAnnotationTarget<S> |
DynamicType.Builder.FieldAnnotationTarget.annotateField(Collection<? extends AnnotationDescription> annotations)
Defines annotations to be added to the currently selected field.
|
DynamicType.Builder.FieldAnnotationTarget<S> |
DynamicType.Builder.AbstractBase.DefaultFieldValueTarget.annotateField(Collection<? extends AnnotationDescription> annotations) |
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.MethodAnnotationTarget.annotateMethod(Collection<? extends AnnotationDescription> annotations)
Defines annotations to be added to the currently selected method.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.AbstractBase.DefaultMethodAnnotationTarget.annotateMethod(Collection<? extends AnnotationDescription> annotations) |
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.MethodAnnotationTarget.annotateParameter(int parameterIndex,
Collection<? extends AnnotationDescription> annotations)
Defines annotations to be added to a parameter of the currently selected methods.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.AbstractBase.DefaultMethodAnnotationTarget.annotateParameter(int parameterIndex,
Collection<? extends AnnotationDescription> annotations) |
DynamicType.Builder<T> |
DynamicType.Builder.annotateType(Collection<? extends AnnotationDescription> annotations)
Adds annotations to the currently constructed type.
|
DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.annotateType(Collection<? extends AnnotationDescription> annotations) |
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.annotateType(Collection<? extends AnnotationDescription> annotations) |
Constructor and Description |
---|
Default(String name,
int modifiers,
List<? extends GenericTypeDescription> typeVariables,
GenericTypeDescription superType,
List<? extends GenericTypeDescription> interfaceTypes,
List<? extends FieldDescription.Token> fieldTokens,
List<? extends MethodDescription.Token> methodTokens,
List<? extends AnnotationDescription> annotationDescriptions,
InstrumentedType.TypeInitializer typeInitializer,
LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type with default values for any properties that only exist for types that are declared within another type.
|
Default(String name,
int modifiers,
List<? extends GenericTypeDescription> typeVariables,
GenericTypeDescription superType,
List<? extends GenericTypeDescription> interfaceTypes,
List<? extends FieldDescription.Token> fieldTokens,
List<? extends MethodDescription.Token> methodTokens,
List<? extends AnnotationDescription> annotationDescriptions,
InstrumentedType.TypeInitializer typeInitializer,
LoadedTypeInitializer loadedTypeInitializer,
TypeDescription declaringType,
MethodDescription enclosingMethod,
TypeDescription enclosingType,
List<? extends TypeDescription> declaredTypes,
boolean memberClass,
boolean anonymousClass,
boolean localClass)
Creates a new instrumented type.
|
Modifier and Type | Method and Description |
---|---|
AnnotationAppender |
AnnotationAppender.append(AnnotationDescription annotation,
AnnotationAppender.AnnotationVisibility annotationVisibility)
Terminally writes the given annotation to the specified target.
|
AnnotationAppender |
AnnotationAppender.Default.append(AnnotationDescription annotation,
AnnotationAppender.AnnotationVisibility annotationVisibility) |
boolean |
AnnotationAppender.ValueFilter.isRelevant(AnnotationDescription annotationDescription,
MethodDescription.InDefinedShape methodDescription)
Checks if the given annotation value should be written as the value of the provided annotation property.
|
boolean |
AnnotationAppender.ValueFilter.SkipDefaults.isRelevant(AnnotationDescription annotationDescription,
MethodDescription.InDefinedShape methodDescription) |
boolean |
AnnotationAppender.ValueFilter.AppendDefaults.isRelevant(AnnotationDescription annotationDescription,
MethodDescription.InDefinedShape methodDescription) |
static AnnotationAppender.AnnotationVisibility |
AnnotationAppender.AnnotationVisibility.of(AnnotationDescription annotation)
Finds the annotation visibility that is declared for a given annotation.
|
Constructor and Description |
---|
ForAnnotation(int parameterIndex,
List<? extends AnnotationDescription> annotations,
AnnotationAppender.ValueFilter valueFilter)
Creates a new appender for appending an annotation to a method.
|
ForAnnotation(List<? extends AnnotationDescription> annotations,
AnnotationAppender.ValueFilter valueFilter)
Creates a new annotation attribute appender for explicit annotation values.
|
ForAnnotation(List<? extends AnnotationDescription> annotations,
AnnotationAppender.ValueFilter valueFilter)
Creates a new appender for appending an annotation to a method.
|
ForAnnotation(List<? extends AnnotationDescription> annotations,
AnnotationAppender.ValueFilter valueFilter)
Creates a new annotation attribute appender for explicit annotation values.
|
Modifier and Type | Method and Description |
---|---|
AnnotationDescription |
TargetMethodAnnotationDrivenBinder.DefaultsProvider.Empty.EmptyIterator.next() |
AnnotationDescription |
Argument.NextUnboundAsDefaultsProvider.NextUnboundArgumentIterator.next() |
Modifier and Type | Method and Description |
---|---|
Iterator<AnnotationDescription> |
TargetMethodAnnotationDrivenBinder.DefaultsProvider.makeIterator(Implementation.Target implementationTarget,
MethodDescription source,
MethodDescription target)
Creates an iterator from which a value is pulled each time no processable annotation is found on a
method parameter.
|
Iterator<AnnotationDescription> |
TargetMethodAnnotationDrivenBinder.DefaultsProvider.Empty.makeIterator(Implementation.Target implementationTarget,
MethodDescription source,
MethodDescription target) |
Iterator<AnnotationDescription> |
Argument.NextUnboundAsDefaultsProvider.makeIterator(Implementation.Target implementationTarget,
MethodDescription source,
MethodDescription target) |
Modifier and Type | Class and Description |
---|---|
class |
AnnotationTypeMatcher<T extends AnnotationDescription>
An element matcher that matches the type of an annotation description.
|
Modifier and Type | Method and Description |
---|---|
static <T extends AnnotationDescription> |
ElementMatchers.anyOf(Annotation... value)
Creates a matcher that matches any of the given annotations as
AnnotationDescription s
by the Object.equals(Object) method. |
static <T extends AnnotationDescription> |
ElementMatchers.is(Annotation annotation)
Exactly matches a given annotation as an
AnnotationDescription . |
static <T extends AnnotationDescription> |
ElementMatchers.noneOf(Annotation... value)
Creates a matcher that matches none of the given annotations as
AnnotationDescription s
by the Object.equals(Object) method. |
Modifier and Type | Method and Description |
---|---|
static <T extends AnnotatedCodeElement> |
ElementMatchers.declaresAnnotation(ElementMatcher<? super AnnotationDescription> matcher)
Matches an
AnnotatedCodeElement to declare any annotation
that matches the given matcher. |
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.
|
Modifier and Type | Method and Description |
---|---|
AnnotationDescription |
TypePool.AbstractBase.RawAnnotationValue.resolve() |
Copyright © 2014–2015. All rights reserved.