Package | Description |
---|---|
net.bytebuddy.description.field |
Contains descriptions of Java fields.
|
net.bytebuddy.description.type |
Contains descriptions of Java types and packages.
|
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 |
The implementation package contains any logic for intercepting method calls.
|
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. fields, types and byte code methods.
|
net.bytebuddy.implementation.auxiliary |
Auxiliary types describe helper types that aid as a supplementary to a given
InstrumentedType . |
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.implementation.bytecode.constant |
StackManipulation s in this package are responsible for
creating compile-time constants and pushing them onto the operand stack. |
net.bytebuddy.implementation.bytecode.member |
StackManipulation s of this package are responsible for
accessing type or method members, i.e. reading and writing of fields, invoking of methods, access of local variables
within a method invocation or returning values from method invocations. |
net.bytebuddy.matcher |
Contains an API for matching Java byte code entities.
|
net.bytebuddy.utility |
This package contains utility classes for common use within any Byte Buddy logic.
|
Modifier and Type | Interface and Description |
---|---|
interface |
FieldList<T extends FieldDescription>
Implementations represent a list of field descriptions.
|
static class |
FieldList.AbstractBase<S extends FieldDescription>
An abstract base implementation of a
FieldList . |
static class |
FieldList.Empty<S extends FieldDescription>
An implementation of an empty field list.
|
static class |
FieldList.Explicit<S extends FieldDescription>
A wrapper implementation of a field list for a given list of field descriptions.
|
Modifier and Type | Interface and Description |
---|---|
static interface |
FieldDescription.InDefinedShape
Represents a field in its defined shape, i.e. in the form it is defined by a class without its type variables being resolved.
|
static interface |
FieldDescription.InGenericShape
Represents a field description in its generic shape, i.e. in the shape it is defined by a generic or raw type.
|
Modifier and Type | Class and Description |
---|---|
static class |
FieldDescription.AbstractBase
An abstract base implementation of a field description.
|
static class |
FieldDescription.ForLoadedField
An implementation of a field description for a loaded field.
|
static class |
FieldDescription.InDefinedShape.AbstractBase
An abstract base implementation of a field description in its defined shape.
|
static class |
FieldDescription.Latent
A latent field description describes a field that is not attached to a declaring
TypeDescription . |
static class |
FieldDescription.TypeSubstituting
A field description that represents a given field but with a substituted field type.
|
Constructor and Description |
---|
Explicit(S... fieldDescription)
Creates a new immutable wrapper field list.
|
TypeSubstituting(TypeDescription.Generic declaringType,
FieldDescription fieldDescription,
TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Creates a field description with a substituted field type.
|
Constructor and Description |
---|
TypeSubstituting(TypeDescription.Generic declaringType,
List<? extends FieldDescription> fieldDescriptions,
TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Creates a new type substituting field list.
|
Modifier and Type | Method and Description |
---|---|
static TypeList.Generic |
TypeList.Generic.ForDetachedTypes.attach(FieldDescription fieldDescription,
List<? extends TypeDescription.Generic> detachedTypes)
Creates a list of types that are attached to the provided field.
|
static TypeDescription.Generic.Visitor.Substitutor.ForAttachment |
TypeDescription.Generic.Visitor.Substitutor.ForAttachment.of(FieldDescription fieldDescription)
Attaches all types to the given field description.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
FieldTransformer.Simple.TransformedField
An implementation of a transformed field.
|
Modifier and Type | Method and Description |
---|---|
FieldDescription |
FieldTransformer.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription)
Transforms a field.
|
FieldDescription |
FieldTransformer.NoOp.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription) |
FieldDescription |
FieldTransformer.Simple.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription) |
FieldDescription |
FieldTransformer.Compound.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription) |
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.FieldDefinition.Optional.Valuable<T> |
DynamicType.Builder.define(FieldDescription field)
Defines a field that is similar to the supplied field but without copying any annotations on the field.
|
DynamicType.Builder.FieldDefinition.Optional.Valuable<S> |
DynamicType.Builder.AbstractBase.define(FieldDescription field) |
FieldDescription |
FieldTransformer.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription)
Transforms a field.
|
FieldDescription |
FieldTransformer.NoOp.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription) |
FieldDescription |
FieldTransformer.Simple.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription) |
FieldDescription |
FieldTransformer.Compound.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription) |
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.FieldDefinition.Valuable<T> |
DynamicType.Builder.field(ElementMatcher<? super FieldDescription> matcher)
Matches a field that is already declared by the instrumented type.
|
DynamicType.Builder.FieldDefinition.Valuable<S> |
DynamicType.Builder.AbstractBase.field(ElementMatcher<? super FieldDescription> matcher) |
DynamicType.Builder.FieldDefinition.Valuable<T> |
DynamicType.Builder.field(LatentMatcher<? super FieldDescription> matcher)
Matches a field that is already declared by the instrumented type.
|
DynamicType.Builder.FieldDefinition.Valuable<U> |
DynamicType.Builder.AbstractBase.Delegator.field(LatentMatcher<? super FieldDescription> matcher) |
DynamicType.Builder.FieldDefinition.Valuable<U> |
DynamicType.Builder.AbstractBase.Adapter.field(LatentMatcher<? super FieldDescription> matcher) |
Constructor and Description |
---|
FieldMatchAdapter(FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
FieldTransformer fieldTransformer,
Object defaultValue,
LatentMatcher<? super FieldDescription> matcher)
Creates a new field match adapter.
|
FieldMatchAdapter(LatentMatcher<? super FieldDescription> matcher)
Creates a new field match adapter.
|
Modifier and Type | Method and Description |
---|---|
FieldDescription |
TypeWriter.FieldPool.Record.getField()
Returns the field that this record represents.
|
FieldDescription |
TypeWriter.FieldPool.Record.ForImplicitField.getField() |
FieldDescription |
TypeWriter.FieldPool.Record.ForExplicitField.getField() |
Modifier and Type | Method and Description |
---|---|
ElementMatcher<? super FieldDescription> |
FieldRegistry.Default.Entry.resolve(TypeDescription instrumentedType) |
Modifier and Type | Method and Description |
---|---|
protected TypeWriter.FieldPool.Record |
FieldRegistry.Default.Compiled.Entry.bind(TypeDescription instrumentedType,
FieldDescription fieldDescription)
Binds this entry to the provided field description.
|
boolean |
FieldRegistry.Default.Compiled.Entry.matches(FieldDescription target) |
TypeWriter.FieldPool.Record |
TypeWriter.FieldPool.target(FieldDescription fieldDescription)
Returns the field attribute appender that matches a given field description or a default field
attribute appender if no appender was registered for the given field.
|
TypeWriter.FieldPool.Record |
FieldRegistry.Compiled.NoOp.target(FieldDescription fieldDescription) |
TypeWriter.FieldPool.Record |
FieldRegistry.Default.Compiled.target(FieldDescription fieldDescription) |
Modifier and Type | Method and Description |
---|---|
FieldRegistry |
FieldRegistry.prepend(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Object defaultValue,
FieldTransformer fieldTransformer)
Prepends the given field definition to this field registry, i.e. this configuration is applied first.
|
FieldRegistry |
FieldRegistry.Default.prepend(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Object defaultValue,
FieldTransformer fieldTransformer) |
Constructor and Description |
---|
ForExplicitField(FieldAttributeAppender attributeAppender,
Object defaultValue,
FieldDescription fieldDescription)
Creates a record for a rich field.
|
ForImplicitField(FieldDescription fieldDescription)
Creates a new record for a simple field.
|
Constructor and Description |
---|
Entry(ElementMatcher<? super FieldDescription> matcher,
FieldAttributeAppender fieldAttributeAppender,
Object defaultValue,
FieldTransformer fieldTransformer)
Creates a new entry.
|
Entry(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Object defaultValue,
FieldTransformer fieldTransformer)
Creates a new entry.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
Implementation.Context.Default.CacheValueField
A description of a field that stores a cached value.
|
Modifier and Type | Method and Description |
---|---|
FieldDescription |
FieldAccessor.FieldLocator.locate(String name,
boolean staticMethod)
Locates a field of a given name or throws an exception if no field with such a name exists.
|
FieldDescription |
FieldAccessor.FieldLocator.ForInstrumentedTypeHierarchy.locate(String name,
boolean staticMethod) |
FieldDescription |
FieldAccessor.FieldLocator.ForGivenType.locate(String name,
boolean staticMethod) |
Modifier and Type | Method and Description |
---|---|
protected ByteCodeAppender.Size |
FieldAccessor.applyGetter(MethodVisitor methodVisitor,
Implementation.Context implementationContext,
FieldDescription fieldDescription,
MethodDescription methodDescription)
Applies a field getter implementation.
|
protected ByteCodeAppender.Size |
FieldAccessor.applySetter(MethodVisitor methodVisitor,
Implementation.Context implementationContext,
FieldDescription fieldDescription,
MethodDescription methodDescription)
Applies a field setter implementation.
|
MethodDescription.InDefinedShape |
Implementation.Context.Default.registerGetterFor(FieldDescription fieldDescription) |
MethodDescription.InDefinedShape |
Implementation.Context.Default.registerSetterFor(FieldDescription fieldDescription) |
StackManipulation |
Implementation.Context.Default.FieldCacheEntry.storeIn(FieldDescription fieldDescription)
Returns a stack manipulation where the represented value is stored in the given field.
|
Constructor and Description |
---|
FieldGetter(TypeDescription instrumentedType,
FieldDescription fieldDescription,
String suffix)
Creates a new field getter.
|
FieldGetterDelegation(MethodDescription methodDescription,
FieldDescription fieldDescription)
Creates a new field getter implementation.
|
FieldSetter(TypeDescription instrumentedType,
FieldDescription fieldDescription,
String suffix)
Creates a new field setter.
|
FieldSetterDelegation(MethodDescription methodDescription,
FieldDescription fieldDescription)
Creates a new field setter.
|
Modifier and Type | Method and Description |
---|---|
void |
FieldAttributeAppender.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription,
AnnotationValueFilter annotationValueFilter)
Applies this attribute appender to a given field visitor.
|
void |
FieldAttributeAppender.NoOp.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription,
AnnotationValueFilter annotationValueFilter) |
void |
FieldAttributeAppender.ForInstrumentedField.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription,
AnnotationValueFilter annotationValueFilter) |
void |
FieldAttributeAppender.Explicit.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription,
AnnotationValueFilter annotationValueFilter) |
void |
FieldAttributeAppender.Compound.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription,
AnnotationValueFilter annotationValueFilter) |
AnnotationValueFilter |
AnnotationValueFilter.Factory.on(FieldDescription fieldDescription)
Creates an annotation value filter for writing annotations on a field.
|
AnnotationValueFilter |
AnnotationValueFilter.Default.on(FieldDescription fieldDescription) |
Modifier and Type | Method and Description |
---|---|
MethodDescription.InDefinedShape |
AuxiliaryType.MethodAccessorFactory.registerGetterFor(FieldDescription fieldDescription)
Registers a getter for the given
FieldDescription which might
itself not be accessible from outside the class. |
MethodDescription.InDefinedShape |
AuxiliaryType.MethodAccessorFactory.Illegal.registerGetterFor(FieldDescription fieldDescription) |
MethodDescription.InDefinedShape |
AuxiliaryType.MethodAccessorFactory.registerSetterFor(FieldDescription fieldDescription)
Registers a setter for the given
FieldDescription which might
itself not be accessible from outside the class. |
MethodDescription.InDefinedShape |
AuxiliaryType.MethodAccessorFactory.Illegal.registerSetterFor(FieldDescription fieldDescription) |
Modifier and Type | Method and Description |
---|---|
FieldDescription |
FieldValue.Binder.FieldLocator.Resolution.getFieldDescription()
Returns the located field description if available or throws an exception if this method is called for an
unresolved resolution.
|
FieldDescription |
FieldValue.Binder.FieldLocator.Resolution.Unresolved.getFieldDescription() |
FieldDescription |
FieldValue.Binder.FieldLocator.Resolution.Resolved.getFieldDescription() |
protected abstract FieldDescription |
FieldProxy.Binder.FieldLocator.Resolution.getFieldDescription()
Returns a description of the located field.
|
protected FieldDescription |
FieldProxy.Binder.FieldLocator.Resolution.Unresolved.getFieldDescription() |
protected FieldDescription |
FieldProxy.Binder.FieldLocator.Resolution.Resolved.getFieldDescription() |
Modifier and Type | Method and Description |
---|---|
protected abstract Implementation |
FieldProxy.Binder.AccessType.access(FieldDescription fieldDescription,
Assigner assigner,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory)
Returns an implementation that implements the sort of accessor implementation that is represented by
this instance.
|
Constructor and Description |
---|
AccessorProxy(FieldDescription accessedField,
Assigner assigner,
TypeDescription instrumentedType,
FieldProxy.Binder.AccessType accessType,
boolean serializableProxy) |
Getter(FieldDescription accessedField,
Assigner assigner,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory)
Creates a new getter implementation.
|
Resolved(FieldDescription fieldDescription)
Creates a successful field resolution.
|
Resolved(FieldDescription fieldDescription)
Creates a new successful resolution.
|
Setter(FieldDescription accessedField,
Assigner assigner,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory)
Creates a new setter implementation.
|
Modifier and Type | Method and Description |
---|---|
static StackManipulation |
MethodHandleConstant.ofGetter(FieldDescription fieldDescription)
Creates a method handle for a field getter.
|
static StackManipulation |
MethodHandleConstant.ofPutter(FieldDescription fieldDescription)
Creates a method handle for a field putter.
|
Modifier and Type | Method and Description |
---|---|
static FieldAccess.Defined |
FieldAccess.forField(FieldDescription fieldDescription)
Creates a field access representation for a given field.
|
protected static FieldAccess.Defined |
FieldAccess.OfGenericField.of(FieldDescription fieldDescription,
FieldAccess.Defined fieldAccess)
Creates a generic access dispatcher for a given field.
|
Modifier and Type | Class and Description |
---|---|
class |
FieldTypeMatcher<T extends FieldDescription>
An element matcher that matches a field's type.
|
Modifier and Type | Method and Description |
---|---|
static <T extends FieldDescription> |
ElementMatchers.anyOf(Field... value)
Creates a matcher that matches any of the given fields as
FieldDescription s
by the Object.equals(Object) method. |
static <T extends FieldDescription> |
ElementMatchers.definedField(ElementMatcher<? super FieldDescription.InDefinedShape> matcher)
Matches a field in its defined shape.
|
static <T extends FieldDescription> |
ElementMatchers.fieldType(Class<?> fieldType)
Matches a field's raw type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.fieldType(ElementMatcher<? super TypeDescription> matcher)
Matches a field's raw type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.fieldType(TypeDescription fieldType)
Matches a field's raw type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.genericFieldType(ElementMatcher<? super TypeDescription.Generic> matcher)
Matches a field's generic type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.genericFieldType(Type fieldType)
Matches a field's generic type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.genericFieldType(TypeDescription.Generic fieldType)
Matches a field's generic type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.is(Field field)
Exactly matches a given field as a
FieldDescription . |
static <T extends FieldDescription> |
ElementMatchers.noneOf(Field... value)
Creates a matcher that matches none of the given methods as
FieldDescription s
by the Object.equals(Object) method. |
Modifier and Type | Method and Description |
---|---|
ElementMatcher<? super FieldDescription> |
LatentMatcher.ForFieldToken.resolve(TypeDescription instrumentedType) |
Modifier and Type | Method and Description |
---|---|
boolean |
LatentMatcher.ForFieldToken.ResolvedMatcher.matches(FieldDescription target) |
Modifier and Type | Method and Description |
---|---|
static <T extends TypeDefinition> |
ElementMatchers.declaresField(ElementMatcher<? super FieldDescription> fieldMatcher)
Matches a type by a another matcher that is applied on any of its declared fields.
|
Constructor and Description |
---|
DeclaringFieldMatcher(ElementMatcher<? super FieldList<? extends FieldDescription>> fieldMatcher)
Creates a new matcher for a type's declared fields.
|
Modifier and Type | Method and Description |
---|---|
static JavaInstance.MethodType |
JavaInstance.MethodType.ofGetter(FieldDescription fieldDescription)
Returns a method type for a getter of the given field.
|
static JavaInstance.MethodHandle |
JavaInstance.MethodHandle.ofGetter(FieldDescription fieldDescription)
Returns a method handle for a setter of the given field.
|
protected static JavaInstance.MethodHandle.HandleType |
JavaInstance.MethodHandle.HandleType.ofGetter(FieldDescription fieldDescription)
Extracts a handle type for a getter of the given field.
|
static JavaInstance.MethodType |
JavaInstance.MethodType.ofSetter(FieldDescription fieldDescription)
Returns a method type for a setter of the given field.
|
static JavaInstance.MethodHandle |
JavaInstance.MethodHandle.ofSetter(FieldDescription fieldDescription)
Returns a method handle for a getter of the given field.
|
protected static JavaInstance.MethodHandle.HandleType |
JavaInstance.MethodHandle.HandleType.ofSetter(FieldDescription fieldDescription)
Extracts a handle type for a setter of the given field.
|
Copyright © 2014–2016. All rights reserved.