Package | Description |
---|---|
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. |
Modifier and Type | Class and Description |
---|---|
static class |
Transformer.Compound<S>
A compound transformer.
|
static class |
Transformer.ForField
A transformer for a field that delegates to another transformer that transforms a
FieldDescription.Token . |
protected static class |
Transformer.ForField.FieldModifierTransformer
A transformer for a field's modifiers.
|
static class |
Transformer.ForMethod
A transformer for a field that delegates to another transformer that transforms a
MethodDescription.Token . |
protected static class |
Transformer.ForMethod.MethodModifierTransformer
A transformer for a method's modifiers.
|
static class |
Transformer.NoOp
A non-operational transformer that returns the received instance.
|
Modifier and Type | Field and Description |
---|---|
protected Transformer<MethodDescription> |
DynamicType.Builder.MethodDefinition.AbstractBase.Adapter.transformer
The transformer to apply onto the method that is currently being implemented.
|
Modifier and Type | Method and Description |
---|---|
static <T> Transformer<T> |
Transformer.NoOp.make()
Creates a transformer in a type-safe manner.
|
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<MethodDescription> |
Transformer.ForMethod.withModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors)
Creates a transformer that enforces the supplied 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.
|
static Transformer<MethodDescription> |
Transformer.ForMethod.withModifiers(ModifierContributor.ForMethod... modifierContributor)
Creates a transformer that enforces the supplied modifier contributors.
|
Modifier and Type | Method and Description |
---|---|
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) |
protected abstract DynamicType.Builder.MethodDefinition<V> |
DynamicType.Builder.MethodDefinition.AbstractBase.Adapter.materialize(MethodRegistry.Handler handler,
MethodAttributeAppender.Factory methodAttributeAppenderFactory,
Transformer<MethodDescription> transformer)
Materializes the current builder as a method definition.
|
protected DynamicType.Builder.MethodDefinition<U> |
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.AnnotationAdapter.materialize(MethodRegistry.Handler handler,
MethodAttributeAppender.Factory methodAttributeAppenderFactory,
Transformer<MethodDescription> transformer) |
protected DynamicType.Builder.MethodDefinition<U> |
DynamicType.Builder.AbstractBase.Adapter.MethodMatchAdapter.AnnotationAdapter.materialize(MethodRegistry.Handler handler,
MethodAttributeAppender.Factory methodAttributeAppenderFactory,
Transformer<MethodDescription> transformer) |
DynamicType.Builder<T> |
DynamicType.Builder.transform(ElementMatcher<? super TypeDescription.Generic> matcher,
Transformer<TypeVariableToken> transformer)
Transforms any type variable that is defined by this type if it is matched by the supplied matcher.
|
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.Delegator.transform(ElementMatcher<? super TypeDescription.Generic> matcher,
Transformer<TypeVariableToken> transformer)
Transforms any type variable that is defined by this type if it is matched by the supplied matcher.
|
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.Adapter.transform(ElementMatcher<? super TypeDescription.Generic> matcher,
Transformer<TypeVariableToken> transformer)
Transforms any type variable that is defined by this type if it is matched by the supplied matcher.
|
DynamicType.Builder.FieldDefinition.Optional<S> |
DynamicType.Builder.FieldDefinition.transform(Transformer<FieldDescription> transformer)
Applies the supplied transformer onto the previously defined or matched field.
|
DynamicType.Builder.MethodDefinition<S> |
DynamicType.Builder.MethodDefinition.transform(Transformer<MethodDescription> transformer)
Applies the supplied transformer onto the previously defined or matched method.
|
DynamicType.Builder.MethodDefinition<V> |
DynamicType.Builder.MethodDefinition.AbstractBase.Adapter.transform(Transformer<MethodDescription> transformer)
Applies the supplied transformer onto the previously defined or matched method.
|
DynamicType.Builder.RecordComponentDefinition.Optional<S> |
DynamicType.Builder.RecordComponentDefinition.transform(Transformer<RecordComponentDescription> transformer)
Transforms a record component description before writing.
|
DynamicType.Builder.RecordComponentDefinition.Optional<U> |
DynamicType.Builder.AbstractBase.Adapter.RecordComponentDefinitionAdapter.transform(Transformer<RecordComponentDescription> transformer)
Transforms a record component description before writing.
|
DynamicType.Builder.RecordComponentDefinition.Optional<U> |
DynamicType.Builder.AbstractBase.Adapter.RecordComponentMatchAdapter.transform(Transformer<RecordComponentDescription> transformer)
Transforms a record component description before writing.
|
Constructor and Description |
---|
Adapter(MethodRegistry.Handler handler,
MethodAttributeAppender.Factory methodAttributeAppenderFactory,
Transformer<MethodDescription> transformer)
Creates a new adapter for a method definition.
|
AnnotationAdapter(MethodRegistry.Handler handler,
MethodAttributeAppender.Factory methodAttributeAppenderFactory,
Transformer<MethodDescription> transformer)
Creates a new annotation adapter.
|
AnnotationAdapter(MethodRegistry.Handler handler,
MethodAttributeAppender.Factory methodAttributeAppenderFactory,
Transformer<MethodDescription> transformer)
Creates a new annotation adapter.
|
Compound(Transformer<S>... transformer)
Creates a new compound transformer.
|
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.
|
ForField(Transformer<FieldDescription.Token> transformer)
Creates a new simple field transformer.
|
ForMethod(Transformer<MethodDescription.Token> transformer)
Creates a new transforming method transformer.
|
RecordComponentDefinitionAdapter(RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory,
Transformer<RecordComponentDescription> transformer,
RecordComponentDescription.Token token)
Creates a new record component definition adapter.
|
RecordComponentMatchAdapter(LatentMatcher<? super RecordComponentDescription> matcher,
RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory,
Transformer<RecordComponentDescription> transformer)
Creates a new record component match adapter.
|
Constructor and Description |
---|
Compound(List<? extends Transformer<S>> transformers)
Creates a new compound transformer.
|
Modifier and Type | Method and Description |
---|---|
protected Transformer<RecordComponentDescription> |
RecordComponentRegistry.Default.Entry.getTransformer()
Returns the record component transformer to apply to any matched record component.
|
protected Transformer<FieldDescription> |
FieldRegistry.Default.Entry.getTransformer()
Returns the field transformer to apply to any matched field.
|
Modifier and Type | Method and Description |
---|---|
MethodRegistry |
MethodRegistry.append(LatentMatcher<? super MethodDescription> methodMatcher,
MethodRegistry.Handler handler,
MethodAttributeAppender.Factory attributeAppenderFactory,
Transformer<MethodDescription> transformer)
Appends the given method definition to this method registry, i.e.
|
MethodRegistry |
MethodRegistry.Default.append(LatentMatcher<? super MethodDescription> matcher,
MethodRegistry.Handler handler,
MethodAttributeAppender.Factory attributeAppenderFactory,
Transformer<MethodDescription> transformer)
Appends the given method definition to this method 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.
|
MethodRegistry |
MethodRegistry.prepend(LatentMatcher<? super MethodDescription> methodMatcher,
MethodRegistry.Handler handler,
MethodAttributeAppender.Factory attributeAppenderFactory,
Transformer<MethodDescription> transformer)
Prepends the given method definition to this method registry, i.e.
|
MethodRegistry |
MethodRegistry.Default.prepend(LatentMatcher<? super MethodDescription> matcher,
MethodRegistry.Handler handler,
MethodAttributeAppender.Factory attributeAppenderFactory,
Transformer<MethodDescription> transformer)
Prepends the given method definition to this method registry, i.e.
|
RecordComponentRegistry |
RecordComponentRegistry.prepend(LatentMatcher<? super RecordComponentDescription> matcher,
RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory,
Transformer<RecordComponentDescription> transformer)
Prepends the given record component definition to this record component registry, i.e.
|
RecordComponentRegistry |
RecordComponentRegistry.Default.prepend(LatentMatcher<? super RecordComponentDescription> matcher,
RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory,
Transformer<RecordComponentDescription> transformer)
Prepends the given record component definition to this record component registry, i.e.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withTypeVariables(ElementMatcher<? super TypeDescription.Generic> matcher,
Transformer<TypeVariableToken> transformer)
Applies a transformation onto all existing type variables of this instrumented type.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withTypeVariables(ElementMatcher<? super TypeDescription.Generic> matcher,
Transformer<TypeVariableToken> transformer)
Applies a transformation onto all existing type variables of this instrumented type.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withTypeVariables(ElementMatcher<? super TypeDescription.Generic> matcher,
Transformer<TypeVariableToken> transformer)
Applies a transformation onto all existing type variables of this instrumented type.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder<T> |
DecoratingDynamicTypeBuilder.transform(ElementMatcher<? super TypeDescription.Generic> matcher,
Transformer<TypeVariableToken> transformer)
Transforms any type variable that is defined by this type if it is matched by the supplied matcher.
|
Copyright © 2014–2020. All rights reserved.