Package | Description |
---|---|
net.bytebuddy.description.field |
Contains descriptions of Java fields.
|
net.bytebuddy.description.type.generic |
Contains descriptions for generic types as defined in the Java programming language.
|
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.
|
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. |
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. |
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.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.
|
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.
|
Modifier and Type | Method and Description |
---|---|
FieldDescription |
FieldList.TypeSubstituting.get(int index) |
Constructor and Description |
---|
TypeSubstituting(GenericTypeDescription declaringType,
FieldDescription fieldDescription,
GenericTypeDescription.Visitor<? extends GenericTypeDescription> visitor)
Creates a field description with a substituted field type.
|
Constructor and Description |
---|
TypeSubstituting(GenericTypeDescription declaringType,
List<? extends FieldDescription> fieldDescriptions,
GenericTypeDescription.Visitor<? extends GenericTypeDescription> visitor)
Creates a new type substituting field list.
|
Modifier and Type | Method and Description |
---|---|
static GenericTypeList |
GenericTypeList.ForDetachedTypes.attach(FieldDescription fieldDescription,
List<? extends GenericTypeDescription> detachedTypes)
Creates a list of types that are attached to the provided field.
|
static GenericTypeDescription.Visitor.Substitutor.ForAttachment |
GenericTypeDescription.Visitor.Substitutor.ForAttachment.of(FieldDescription fieldDescription)
Attaches all types to the given field description.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.FieldValueTarget<T> |
DynamicType.Builder.defineField(FieldDescription fieldDescription)
Defines a new field for this type.
|
DynamicType.Builder.FieldValueTarget<S> |
DynamicType.Builder.AbstractBase.defineField(FieldDescription fieldDescription) |
DynamicType.Builder.FieldValueTarget<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.defineField(FieldDescription fieldDescription) |
Modifier and Type | Method and Description |
---|---|
protected TypeWriter.FieldPool.Record |
FieldRegistry.Default.Compiled.Entry.bind(FieldDescription fieldDescription)
Binds this entry to the provided field description.
|
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) |
Constructor and Description |
---|
ForRichField(FieldAttributeAppender attributeAppender,
Object defaultValue,
FieldDescription fieldDescription)
Creates a record for a rich field.
|
ForSimpleField(FieldDescription fieldDescription)
Creates a new record for a simple field.
|
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 |
Implementation.Context.cache(StackManipulation fieldValue,
TypeDescription fieldType)
Caches a single value by storing it in form of a
private , final and static field. |
FieldDescription |
Implementation.Context.Disabled.cache(StackManipulation fieldValue,
TypeDescription fieldType) |
FieldDescription |
Implementation.Context.Default.cache(StackManipulation fieldValue,
TypeDescription fieldType) |
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)
Applies this attribute appender to a given field visitor.
|
void |
FieldAttributeAppender.NoOp.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription) |
void |
FieldAttributeAppender.ForAnnotation.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription) |
void |
FieldAttributeAppender.ForField.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription) |
void |
FieldAttributeAppender.Compound.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription) |
Constructor and Description |
---|
ForField(FieldDescription fieldDescription,
AnnotationAppender.ValueFilter valueFilter)
Creates a new field attribute appender that appends all annotations that are found on a field.
|
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.
|
Constructor and Description |
---|
AccessDispatcher(FieldDescription fieldDescription)
Creates a new access dispatcher.
|
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.fieldRepresentedBy(ElementMatcher<? super FieldDescription.Token> matcher)
Matches a field by a token matcher.
|
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 GenericTypeDescription> 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 GenericTypeDescription> matcher)
Matches a field's generic type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.genericFieldType(GenericTypeDescription fieldType)
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.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. |
static <T extends FieldDescription> |
ElementMatchers.representedBy(FieldDescription.Token fieldToken)
Validates if a method is represented by the provided field token.
|
Modifier and Type | Method and Description |
---|---|
static <T extends GenericTypeDescription> |
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 |
---|---|
GenericTypeDescription |
TypePool.LazyTypeDescription.GenericTypeToken.Resolution.Raw.resolveFieldType(String fieldTypeDescriptor,
TypePool typePool,
FieldDescription definingField) |
GenericTypeDescription |
TypePool.LazyTypeDescription.GenericTypeToken.Resolution.Malformed.resolveFieldType(String fieldTypeDescriptor,
TypePool typePool,
FieldDescription definingField) |
GenericTypeDescription |
TypePool.LazyTypeDescription.GenericTypeToken.Resolution.ForField.resolveFieldType(String fieldTypeDescriptor,
TypePool typePool,
FieldDescription definingField)
Resolves the field type of the represented field.
|
GenericTypeDescription |
TypePool.LazyTypeDescription.GenericTypeToken.Resolution.ForField.Tokenized.resolveFieldType(String fieldTypeDescriptor,
TypePool typePool,
FieldDescription definingField) |
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–2015. All rights reserved.