Package | Description |
---|---|
net.bytebuddy.asm |
The ASM package contains classes that are meant for direct interaction with the ASM API.
|
net.bytebuddy.build |
A package for types that allow for applying Byte Buddy transformation during a build process.
|
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.dynamic.scaffold.inline |
All classes and types in this package are related to creating a
DynamicType by
enhancing a given type. |
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.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.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.utility |
This package contains utility classes for common use within any Byte Buddy logic.
|
Modifier and Type | Field and Description |
---|---|
protected FieldDescription |
MemberSubstitution.Substitution.Chain.Step.ForField.fieldDescription
The field description accessed in this step.
|
protected FieldDescription |
Advice.OffsetMapping.Target.ForField.fieldDescription
The field value to load.
|
Modifier and Type | Method and Description |
---|---|
FieldDescription |
MemberSubstitution.Substitution.ForFieldAccess.FieldResolver.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the field to substitute with.
|
FieldDescription |
MemberSubstitution.Substitution.ForFieldAccess.FieldResolver.Simple.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the field to substitute with.
|
FieldDescription |
MemberSubstitution.Substitution.ForFieldAccess.FieldResolver.ForElementMatcher.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the field to substitute with.
|
protected abstract FieldDescription |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves a description of the field being accessed.
|
protected FieldDescription |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField.Unresolved.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod) |
protected FieldDescription |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField.Resolved.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod) |
protected abstract FieldDescription |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves a description of the field being accessed.
|
protected FieldDescription |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Unresolved.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod) |
protected FieldDescription |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Resolved.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod) |
protected abstract FieldDescription |
Advice.OffsetMapping.ForField.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the field being bound.
|
protected FieldDescription |
Advice.OffsetMapping.ForField.Unresolved.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod) |
protected FieldDescription |
Advice.OffsetMapping.ForField.Resolved.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod) |
protected abstract FieldDescription |
Advice.OffsetMapping.ForFieldHandle.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the field being bound.
|
protected FieldDescription |
Advice.OffsetMapping.ForFieldHandle.Unresolved.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod) |
protected FieldDescription |
Advice.OffsetMapping.ForFieldHandle.Resolved.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod) |
Modifier and Type | Method and Description |
---|---|
<T extends Annotation> |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.WithCustomMapping.bind(Class<T> type,
FieldDescription fieldDescription)
Binds the supplied annotation to the value of the supplied field.
|
<T extends Annotation> |
Advice.WithCustomMapping.bind(Class<T> type,
FieldDescription fieldDescription)
Binds the supplied annotation to the value of the supplied field.
|
MemberSubstitution |
MemberSubstitution.WithoutSpecification.replaceWith(FieldDescription fieldDescription)
Replaces any interaction with a matched byte code element by an interaction with the specified field.
|
Modifier and Type | Method and Description |
---|---|
MemberSubstitution |
MemberSubstitution.WithoutSpecification.replaceWithField(ElementMatcher<? super FieldDescription> matcher)
Replaces any interaction with a matched byte code element with a non-static field access on the first
parameter of the matched element.
|
Constructor and Description |
---|
Factory(Class<T> annotationType,
FieldDescription fieldDescription)
Creates a factory for reading a given field.
|
Factory(Class<T> annotationType,
FieldDescription fieldDescription)
Creates a new factory for binding a specific field with read-only semantics and static typing.
|
Factory(Class<T> annotationType,
FieldDescription fieldDescription,
Advice.OffsetMapping.ForFieldHandle.Access access)
Creates a new factory for binding a specific field handle.
|
Factory(Class<T> annotationType,
FieldDescription fieldDescription,
Assigner.Typing typing)
Creates a factory for reading a given field.
|
Factory(Class<T> annotationType,
FieldDescription fieldDescription,
boolean readOnly,
Assigner.Typing typing)
Creates a new factory for binding a specific field.
|
Factory(Class<T> annotationType,
FieldDescription fieldDescription,
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Access access)
Creates a new factory for a field access handle.
|
Factory(FieldDescription fieldDescription)
Creates a factory for a step reading a field.
|
Factory(FieldDescription fieldDescription,
int index)
Creates a factory for writing to a field.
|
ForField(FieldDescription fieldDescription,
Assigner assigner,
Assigner.Typing typing)
Creates a new step for a field access.
|
ForField(FieldDescription fieldDescription,
StackManipulation readAssignment)
Creates a new target for a field value mapping.
|
OfGivenField(FieldDescription fieldDescription)
Creates a new factory that substitues with a given field.
|
Read(FieldDescription fieldDescription,
Assigner assigner,
Assigner.Typing typing)
Creates a step for reading a field.
|
ReadOnly(FieldDescription fieldDescription)
Creates a new read-only mapping for a field.
|
ReadOnly(FieldDescription fieldDescription,
StackManipulation readAssignment)
Creates a new read-only mapping for a field.
|
ReadWrite(FieldDescription fieldDescription)
Creates a new target for a writable field.
|
ReadWrite(FieldDescription fieldDescription,
StackManipulation readAssignment,
StackManipulation writeAssignment)
Creates a new target for a writable field.
|
Resolved(Advice.OffsetMapping.ForFieldHandle.Access access,
FieldDescription fieldDescription)
Creates a resolved offset mapping for a field handle.
|
Resolved(MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Access access,
FieldDescription fieldDescription)
Creates a resolved mapping for a field access handle.
|
Resolved(TypeDescription.Generic target,
Assigner.Typing typing,
FieldDescription fieldDescription)
Creates a resolved offset mapping for a field access.
|
Resolved(TypeDescription.Generic target,
boolean readOnly,
Assigner.Typing typing,
FieldDescription fieldDescription)
Creates a resolved offset mapping for a field.
|
Simple(FieldDescription fieldDescription)
Creates a simple field resolver.
|
Write(FieldDescription fieldDescription,
Assigner assigner,
Assigner.Typing typing,
int index)
Creates a step for writing to a field.
|
WriteOnly(FieldDescription fieldDescription,
StackManipulation writeAssignment)
Creates a write-only mapping for a field value.
|
Constructor and Description |
---|
ForElementMatcher(TypeDescription instrumentedType,
ElementMatcher<? super FieldDescription> matcher)
Creates a new field resolver that locates a field on the receiver type using a matcher.
|
OfMatchedField(ElementMatcher<? super FieldDescription> matcher)
Creates a new substitution factory that locates a field by applying a matcher on the receiver type.
|
Modifier and Type | Method and Description |
---|---|
protected ElementMatcher<FieldDescription> |
HashCodeAndEqualsPlugin.nonNullable(ElementMatcher<FieldDescription> matcher)
Resolves the matcher to identify non-nullable fields.
|
protected ElementMatcher<FieldDescription> |
HashCodeAndEqualsPlugin.WithNonNullableFields.nonNullable(ElementMatcher<FieldDescription> matcher)
Resolves the matcher to identify non-nullable fields.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
HashCodeAndEqualsPlugin.ValueMatcher.doMatch(FieldDescription target)
Matches the supplied value if it was found not to be
null . |
Modifier and Type | Method and Description |
---|---|
protected ElementMatcher<FieldDescription> |
HashCodeAndEqualsPlugin.nonNullable(ElementMatcher<FieldDescription> matcher)
Resolves the matcher to identify non-nullable fields.
|
protected ElementMatcher<FieldDescription> |
HashCodeAndEqualsPlugin.WithNonNullableFields.nonNullable(ElementMatcher<FieldDescription> matcher)
Resolves the matcher to identify non-nullable fields.
|
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.
|
static interface |
FieldDescription.InGenericShape
Represents a field description in its generic 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.
|
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 |
Transformer.ForField.TransformedField
An implementation of a transformed field.
|
Modifier and Type | Method and Description |
---|---|
FieldDescription |
Transformer.ForField.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription)
Transforms the supplied target.
|
Modifier and Type | Method and Description |
---|---|
static Transformer<FieldDescription> |
Transformer.ForField.withModifiers(List<? extends ModifierContributor.ForField> modifierContributors)
Creates a field transformer that patches the transformed field by the given modifier contributors.
|
static Transformer<FieldDescription> |
Transformer.ForField.withModifiers(ModifierContributor.ForField... modifierContributor)
Creates a field transformer that patches the transformed field by the given modifier contributors.
|
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)
Defines a field that is similar to the supplied field but without copying any annotations on the field.
|
FieldDescription |
Transformer.ForField.transform(TypeDescription instrumentedType,
FieldDescription fieldDescription)
Transforms the supplied target.
|
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)
Matches a field that is already declared by the instrumented type.
|
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)
Matches a field that is already declared by the instrumented type.
|
DynamicType.Builder.FieldDefinition.Valuable<U> |
DynamicType.Builder.AbstractBase.Adapter.field(LatentMatcher<? super FieldDescription> matcher)
Matches a field that is already declared by the instrumented type.
|
protected DynamicType.Builder.FieldDefinition.Optional<U> |
DynamicType.Builder.AbstractBase.Adapter.FieldDefinitionAdapter.materialize(FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Transformer<FieldDescription> transformer,
Object defaultValue) |
protected DynamicType.Builder.FieldDefinition.Optional<U> |
DynamicType.Builder.AbstractBase.Adapter.FieldMatchAdapter.materialize(FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Transformer<FieldDescription> transformer,
Object defaultValue) |
DynamicType.Builder.FieldDefinition.Optional<S> |
DynamicType.Builder.FieldDefinition.transform(Transformer<FieldDescription> transformer)
Applies the supplied transformer onto the previously defined or matched field.
|
Constructor and Description |
---|
FieldDefinitionAdapter(FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Transformer<FieldDescription> transformer,
Object defaultValue,
FieldDescription.Token token)
Creates a new field definition adapter.
|
FieldMatchAdapter(FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Transformer<FieldDescription> transformer,
Object defaultValue,
LatentMatcher<? super FieldDescription> matcher)
Creates a new field match adapter.
|
FieldMatchAdapter(FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Transformer<FieldDescription> transformer,
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()
Returns the field that this record represents.
|
FieldDescription |
TypeWriter.FieldPool.Record.ForExplicitField.getField()
Returns the field that this record represents.
|
FieldDescription |
FieldLocator.Resolution.getField()
Returns the field description if a field was located.
|
FieldDescription |
FieldLocator.Resolution.Illegal.getField()
Returns the field description if a field was located.
|
FieldDescription |
FieldLocator.Resolution.Simple.getField()
Returns the field description if a field was located.
|
Modifier and Type | Method and Description |
---|---|
protected Transformer<FieldDescription> |
FieldRegistry.Default.Entry.getTransformer()
Returns the field transformer to apply to any matched field.
|
ElementMatcher<? super FieldDescription> |
FieldRegistry.Default.Entry.resolve(TypeDescription typeDescription)
Resolves the element matcher this instance represents for the supplied type description.
|
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)
Matches a target against this element matcher.
|
TypeWriter.FieldPool.Record |
TypeWriter.FieldPool.target(FieldDescription fieldDescription)
Looks up a handler entry for a given field.
|
TypeWriter.FieldPool.Record |
TypeWriter.FieldPool.Disabled.target(FieldDescription fieldDescription)
Looks up a handler entry for a given field.
|
TypeWriter.FieldPool.Record |
FieldRegistry.Compiled.NoOp.target(FieldDescription fieldDescription)
Looks up a handler entry for a given field.
|
TypeWriter.FieldPool.Record |
FieldRegistry.Default.Compiled.target(FieldDescription fieldDescription)
Looks up a handler entry for a given field.
|
Modifier and Type | Method and Description |
---|---|
protected abstract FieldList<?> |
FieldLocator.AbstractBase.locate(ElementMatcher<? super FieldDescription> matcher)
Locates fields that match the given matcher.
|
protected FieldList<?> |
FieldLocator.ForExactType.locate(ElementMatcher<? super FieldDescription> matcher) |
protected FieldList<?> |
FieldLocator.ForClassHierarchy.locate(ElementMatcher<? super FieldDescription> matcher) |
protected FieldList<?> |
FieldLocator.ForTopLevelType.locate(ElementMatcher<? super FieldDescription> matcher) |
FieldRegistry |
FieldRegistry.prepend(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Object defaultValue,
Transformer<FieldDescription> transformer)
Prepends the given field definition to this field registry, i.e.
|
FieldRegistry |
FieldRegistry.prepend(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Object defaultValue,
Transformer<FieldDescription> transformer)
Prepends the given field definition to this field registry, i.e.
|
FieldRegistry |
FieldRegistry.Default.prepend(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Object defaultValue,
Transformer<FieldDescription> transformer)
Prepends the given field definition to this field registry, i.e.
|
FieldRegistry |
FieldRegistry.Default.prepend(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Object defaultValue,
Transformer<FieldDescription> transformer)
Prepends the given field definition to this field registry, i.e.
|
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.
|
Simple(FieldDescription fieldDescription)
Creates a new simple resolution for a field.
|
Constructor and Description |
---|
Entry(ElementMatcher<? super FieldDescription> matcher,
FieldAttributeAppender fieldAttributeAppender,
Object defaultValue,
Transformer<FieldDescription> transformer)
Creates a new entry.
|
Entry(ElementMatcher<? super FieldDescription> matcher,
FieldAttributeAppender fieldAttributeAppender,
Object defaultValue,
Transformer<FieldDescription> transformer)
Creates a new entry.
|
Entry(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Object defaultValue,
Transformer<FieldDescription> transformer)
Creates a new entry.
|
Entry(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
Object defaultValue,
Transformer<FieldDescription> transformer)
Creates a new entry.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.FieldDefinition.Valuable<T> |
DecoratingDynamicTypeBuilder.field(LatentMatcher<? super FieldDescription> matcher)
Matches a field that is already declared by the instrumented type.
|
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.FieldLocation.Prepared.resolve(MethodDescription instrumentedMethod)
Resolves the field description to use.
|
FieldDescription |
FieldAccessor.FieldLocation.Absolute.resolve(MethodDescription instrumentedMethod)
Resolves the field description to use.
|
FieldDescription |
FieldAccessor.FieldLocation.Relative.Prepared.resolve(MethodDescription instrumentedMethod)
Resolves the field description to use.
|
protected abstract FieldDescription |
MethodDelegation.ImplementationDelegate.ForField.resolve(TypeDescription instrumentedType)
Resolves the field to which is delegated.
|
protected FieldDescription |
MethodDelegation.ImplementationDelegate.ForField.WithInstance.resolve(TypeDescription instrumentedType) |
protected FieldDescription |
MethodDelegation.ImplementationDelegate.ForField.WithLookup.resolve(TypeDescription instrumentedType) |
FieldDescription |
MethodCall.TargetHandler.ForField.Location.resolve(TypeDescription instrumentedType)
Resolves the field to invoke the method upon.
|
FieldDescription |
MethodCall.TargetHandler.ForField.Location.ForImplicitField.resolve(TypeDescription instrumentedType)
Resolves the field to invoke the method upon.
|
FieldDescription |
MethodCall.TargetHandler.ForField.Location.ForExplicitField.resolve(TypeDescription instrumentedType)
Resolves the field to invoke the method upon.
|
Modifier and Type | Method and Description |
---|---|
protected ByteCodeAppender.Size |
InvocationHandlerAdapter.apply(MethodVisitor methodVisitor,
Implementation.Context implementationContext,
MethodDescription instrumentedMethod,
StackManipulation preparingManipulation,
FieldDescription fieldDescription)
Applies an implementation that delegates to a invocation handler.
|
static FieldAccessor.AssignerConfigurable |
FieldAccessor.of(FieldDescription fieldDescription)
Defines a field accessor where the specified field is accessed.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onField(FieldDescription fieldDescription)
Invokes a method on the object stored in the specified field.
|
MethodDescription.InDefinedShape |
MethodAccessorFactory.registerGetterFor(FieldDescription fieldDescription,
MethodAccessorFactory.AccessType accessType)
Registers a getter for the given
FieldDescription which might
itself not be accessible from outside the class. |
MethodDescription.InDefinedShape |
MethodAccessorFactory.Illegal.registerGetterFor(FieldDescription fieldDescription,
MethodAccessorFactory.AccessType accessType)
Registers a getter for the given
FieldDescription which might
itself not be accessible from outside the class. |
MethodDescription.InDefinedShape |
Implementation.Context.Disabled.registerGetterFor(FieldDescription fieldDescription,
MethodAccessorFactory.AccessType accessType)
Registers a getter for the given
FieldDescription which might
itself not be accessible from outside the class. |
MethodDescription.InDefinedShape |
Implementation.Context.Default.registerGetterFor(FieldDescription fieldDescription,
MethodAccessorFactory.AccessType accessType)
Registers a getter for the given
FieldDescription which might
itself not be accessible from outside the class. |
MethodDescription.InDefinedShape |
MethodAccessorFactory.registerSetterFor(FieldDescription fieldDescription,
MethodAccessorFactory.AccessType accessType)
Registers a setter for the given
FieldDescription which might
itself not be accessible from outside the class. |
MethodDescription.InDefinedShape |
MethodAccessorFactory.Illegal.registerSetterFor(FieldDescription fieldDescription,
MethodAccessorFactory.AccessType accessType)
Registers a setter for the given
FieldDescription which might
itself not be accessible from outside the class. |
MethodDescription.InDefinedShape |
Implementation.Context.Disabled.registerSetterFor(FieldDescription fieldDescription,
MethodAccessorFactory.AccessType accessType)
Registers a setter for the given
FieldDescription which might
itself not be accessible from outside the class. |
MethodDescription.InDefinedShape |
Implementation.Context.Default.registerSetterFor(FieldDescription fieldDescription,
MethodAccessorFactory.AccessType accessType)
Registers a setter for the given
FieldDescription which might
itself not be accessible from outside the class. |
protected StackManipulation |
FieldAccessor.ForSetter.OfFieldValue.resolve(FieldAccessor.FieldLocation.Prepared target,
FieldDescription fieldDescription,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the stack manipulation to load the value being set.
|
protected StackManipulation |
FieldAccessor.ForSetter.OfReferenceValue.resolve(FieldDescription.InDefinedShape target,
FieldDescription fieldDescription,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the stack manipulation to load the value being set.
|
protected abstract StackManipulation |
FieldAccessor.ForSetter.resolve(T initialized,
FieldDescription fieldDescription,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the stack manipulation to load the value being set.
|
protected StackManipulation |
FieldAccessor.ForSetter.OfParameterValue.resolve(Void unused,
FieldDescription fieldDescription,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the stack manipulation to load the value being set.
|
protected StackManipulation |
FieldAccessor.ForSetter.OfDefaultValue.resolve(Void initialized,
FieldDescription fieldDescription,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the stack manipulation to load the value being set.
|
protected StackManipulation |
FieldAccessor.ForSetter.OfConstantValue.resolve(Void unused,
FieldDescription fieldDescription,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the stack manipulation to load the value being set.
|
MethodCall.FieldSetting |
MethodCall.setsField(FieldDescription fieldDescription)
Sets the result of the method call as a value of the specified field.
|
Implementation.Composable |
FieldAccessor.PropertyConfigurable.setsFieldValueOf(FieldDescription fieldDescription)
Defines a setter of a value that sets another field's value.
|
Implementation.Composable |
FieldAccessor.ForImplicitProperty.setsFieldValueOf(FieldDescription fieldDescription)
Defines a setter of a value that sets another field's value.
|
protected ByteCodeAppender |
Implementation.Context.Default.FieldCacheEntry.storeIn(FieldDescription fieldDescription)
Returns a stack manipulation where the represented value is stored in the given field.
|
Modifier and Type | Method and Description |
---|---|
MethodCall.FieldSetting |
MethodCall.setsField(ElementMatcher<? super FieldDescription> matcher)
Sets the result of the method call as a value of the specified field.
|
Constructor and Description |
---|
Absolute(FieldDescription fieldDescription)
Creates an absolute field location.
|
Appender(FieldDescription fieldDescription)
Creates a new appender.
|
ArgumentProvider(FieldDescription fieldDescription)
Creates a new argument provider for a field access.
|
Explicit(FieldDescription fieldDescription)
Creates a factory for a field-setting termination handler.
|
FieldGetter(TypeDescription instrumentedType,
FieldDescription fieldDescription,
String suffix)
Creates a new field getter.
|
FieldGetterDelegation(TypeDescription instrumentedType,
String suffix,
MethodAccessorFactory.AccessType accessType,
FieldDescription fieldDescription)
Creates a new field getter implementation.
|
FieldSetter(TypeDescription instrumentedType,
FieldDescription fieldDescription,
String suffix)
Creates a new field setter.
|
FieldSetterDelegation(TypeDescription instrumentedType,
String suffix,
MethodAccessorFactory.AccessType accessType,
FieldDescription fieldDescription)
Creates a new field setter implementation.
|
FieldSetting(FieldDescription fieldDescription)
Creates a new field-setting termination handler.
|
ForExplicitField(FieldDescription fieldDescription)
Creates an explicit field location.
|
ForField(FieldDescription fieldDescription)
Creates a new target handler for a field description.
|
ForField(FieldDescription fieldDescription,
List<MethodDelegationBinder.Record> records)
Creates a new compiled implementation delegate for a field delegation.
|
ForField(FieldDescription fieldDescription,
MethodDescription instrumentedMethod)
Creates a new argument loader for loading an existing field.
|
ForInstance(FieldDescription fieldDescription)
Creates an argument loader that supplies the value of a static field as an argument.
|
Constructor and Description |
---|
Implicit(ElementMatcher<? super FieldDescription> matcher)
Creates a factory for a field-setting termination handler.
|
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)
Applies this attribute appender to a given field visitor.
|
void |
FieldAttributeAppender.ForInstrumentedField.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription,
AnnotationValueFilter annotationValueFilter)
Applies this attribute appender to a given field visitor.
|
void |
FieldAttributeAppender.Explicit.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription,
AnnotationValueFilter annotationValueFilter)
Applies this attribute appender to a given field visitor.
|
void |
FieldAttributeAppender.Compound.apply(FieldVisitor fieldVisitor,
FieldDescription fieldDescription,
AnnotationValueFilter annotationValueFilter)
Applies this attribute appender to a given field visitor.
|
AnnotationValueFilter |
AnnotationValueFilter.Factory.on(FieldDescription fieldDescription)
Creates an annotation value filter for writing annotations on a field.
|
AnnotationValueFilter |
AnnotationValueFilter.Default.on(FieldDescription fieldDescription)
Creates an annotation value filter for writing annotations on a field.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder<?> |
FieldProxy.Binder.FieldResolver.apply(DynamicType.Builder<?> builder,
FieldDescription fieldDescription,
Assigner assigner,
MethodAccessorFactory methodAccessorFactory)
Applies this field resolver to a dynamic type.
|
DynamicType.Builder<?> |
FieldProxy.Binder.FieldResolver.Unresolved.apply(DynamicType.Builder<?> builder,
FieldDescription fieldDescription,
Assigner assigner,
MethodAccessorFactory methodAccessorFactory)
Applies this field resolver to a dynamic type.
|
DynamicType.Builder<?> |
FieldProxy.Binder.FieldResolver.ForGetter.apply(DynamicType.Builder<?> builder,
FieldDescription fieldDescription,
Assigner assigner,
MethodAccessorFactory methodAccessorFactory)
Applies this field resolver to a dynamic type.
|
DynamicType.Builder<?> |
FieldProxy.Binder.FieldResolver.ForSetter.apply(DynamicType.Builder<?> builder,
FieldDescription fieldDescription,
Assigner assigner,
MethodAccessorFactory methodAccessorFactory)
Applies this field resolver to a dynamic type.
|
DynamicType.Builder<?> |
FieldProxy.Binder.FieldResolver.ForGetterSetterPair.apply(DynamicType.Builder<?> builder,
FieldDescription fieldDescription,
Assigner assigner,
MethodAccessorFactory methodAccessorFactory)
Applies this field resolver to a dynamic type.
|
protected MethodDelegationBinder.ParameterBinding<?> |
FieldGetterHandle.Binder.Delegate.bind(FieldDescription fieldDescription,
AnnotationDescription.Loadable<FieldGetterHandle> annotation,
MethodDescription source,
ParameterDescription target,
Implementation.Target implementationTarget,
Assigner assigner) |
protected MethodDelegationBinder.ParameterBinding<?> |
FieldProxy.Binder.bind(FieldDescription fieldDescription,
AnnotationDescription.Loadable<FieldProxy> annotation,
MethodDescription source,
ParameterDescription target,
Implementation.Target implementationTarget,
Assigner assigner) |
protected MethodDelegationBinder.ParameterBinding<?> |
FieldSetterHandle.Binder.Delegate.bind(FieldDescription fieldDescription,
AnnotationDescription.Loadable<FieldSetterHandle> annotation,
MethodDescription source,
ParameterDescription target,
Implementation.Target implementationTarget,
Assigner assigner) |
protected MethodDelegationBinder.ParameterBinding<?> |
FieldValue.Binder.Delegate.bind(FieldDescription fieldDescription,
AnnotationDescription.Loadable<FieldValue> annotation,
MethodDescription source,
ParameterDescription target,
Implementation.Target implementationTarget,
Assigner assigner) |
protected abstract MethodDelegationBinder.ParameterBinding<?> |
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding.bind(FieldDescription fieldDescription,
AnnotationDescription.Loadable<S> annotation,
MethodDescription source,
ParameterDescription target,
Implementation.Target implementationTarget,
Assigner assigner)
Creates a parameter binding for the given target parameter.
|
FieldProxy.Binder.FieldResolver |
FieldProxy.Binder.FieldResolver.Factory.resolve(TypeDescription parameterType,
FieldDescription fieldDescription)
Creates a field resolver.
|
FieldProxy.Binder.FieldResolver |
FieldProxy.Binder.FieldResolver.Factory.Duplex.resolve(TypeDescription parameterType,
FieldDescription fieldDescription)
Creates a field resolver.
|
FieldProxy.Binder.FieldResolver |
FieldProxy.Binder.FieldResolver.Factory.Simplex.resolve(TypeDescription parameterType,
FieldDescription fieldDescription)
Creates a field resolver.
|
Constructor and Description |
---|
AccessorProxy(FieldDescription fieldDescription,
TypeDescription instrumentedType,
FieldProxy.Binder.FieldResolver fieldResolver,
Assigner assigner,
boolean serializableProxy) |
FieldGetter(FieldDescription fieldDescription,
Assigner assigner,
MethodAccessorFactory methodAccessorFactory)
Creates a new getter implementation.
|
FieldSetter(FieldDescription fieldDescription,
Assigner assigner,
MethodAccessorFactory methodAccessorFactory)
Creates a new setter implementation.
|
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 in its defined shape. |
static <T extends FieldDescription> |
ElementMatchers.is(FieldDescription.InDefinedShape field)
Exactly matches a given field as a
FieldDescription in its defined shape. |
static <T extends FieldDescription> |
ElementMatchers.isTransient()
Matches a
transient field. |
static <T extends FieldDescription> |
ElementMatchers.isVolatile()
Matches a
volatile field. |
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 typeDescription)
Resolves the element matcher this instance represents for the supplied type description.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
LatentMatcher.ForFieldToken.ResolvedMatcher.doMatch(FieldDescription target)
Matches the supplied value if it was found not to be
null . |
Modifier and Type | Method and Description |
---|---|
static <T extends TypeDefinition> |
ElementMatchers.declaresField(ElementMatcher<? super FieldDescription> matcher)
Matches a type by another matcher that is applied on any of its declared fields.
|
Constructor and Description |
---|
DeclaringFieldMatcher(ElementMatcher<? super FieldList<? extends FieldDescription>> matcher)
Creates a new matcher for a type's declared fields.
|
Modifier and Type | Method and Description |
---|---|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofGetter(FieldDescription fieldDescription)
Returns a method type for a getter of the given field.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofSetter(FieldDescription fieldDescription)
Returns a method type for a setter of the given field.
|
Copyright © 2014–2023. All rights reserved.