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. |
net.bytebuddy.dynamic.scaffold.subclass |
All classes and types in this package are related to creating a
DynamicType by
creating a subclass of a given type. |
Modifier and Type | Field and Description |
---|---|
protected InstrumentedType.WithFlexibleName |
DynamicType.Builder.AbstractBase.Adapter.instrumentedType
The instrumented type to be created.
|
Modifier and Type | Method and Description |
---|---|
protected abstract DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.Adapter.materialize(InstrumentedType.WithFlexibleName instrumentedType,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
List<? extends DynamicType> auxiliaryTypes)
Materializes the supplied state of a dynamic type builder.
|
Constructor and Description |
---|
Adapter(InstrumentedType.WithFlexibleName instrumentedType,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
List<? extends DynamicType> auxiliaryTypes)
Creates a new default type writer for creating a new type that is not based on an existing class file.
|
Modifier and Type | Class and Description |
---|---|
static class |
InstrumentedType.Default
A default implementation of an instrumented type.
|
static class |
InstrumentedType.Frozen
A frozen representation of an instrumented type of which the structure must not be modified.
|
Modifier and Type | Method and Description |
---|---|
InstrumentedType.WithFlexibleName |
InstrumentedType.Factory.represent(TypeDescription typeDescription)
Creates an instrumented type that represents the provided type.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Factory.subclass(String name,
int modifiers,
TypeDescription.Generic superClass)
Creates a new instrumented type as a subclass.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Factory.Default.subclass(String name,
int modifiers,
TypeDescription.Generic superClass)
Creates a new instrumented type as a subclass.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withAnnotations(List<? extends AnnotationDescription> annotationDescriptions)
Creates a new instrumented type with the given annotations.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withAnnotations(List<? extends AnnotationDescription> annotationDescriptions)
Creates a new instrumented type with the given annotations.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withAnnotations(List<? extends AnnotationDescription> annotationDescriptions)
Creates a new instrumented type with the given annotations.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withAnonymousClass(boolean anonymousClass)
Creates a new instrumented type that indicates that is defined as an anonymous class.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withAnonymousClass(boolean anonymousClass)
Creates a new instrumented type that indicates that is defined as an anonymous class.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withAnonymousClass(boolean anonymousClass)
Creates a new instrumented type that indicates that is defined as an anonymous class.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withDeclaredTypes(TypeList declaredTypes)
Creates a new instrumented type that indicates that it declared the supplied types.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withDeclaredTypes(TypeList declaredTypes)
Creates a new instrumented type that indicates that it declared the supplied types.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withDeclaredTypes(TypeList declaredTypes)
Creates a new instrumented type that indicates that it declared the supplied types.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withDeclaringType(TypeDescription declaringType)
Creates a new instrumented type that is declared by the supplied type..
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withDeclaringType(TypeDescription declaringType)
Creates a new instrumented type that is declared by the supplied type..
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withDeclaringType(TypeDescription declaringType)
Creates a new instrumented type that is declared by the supplied type..
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withEnclosingMethod(MethodDescription.InDefinedShape enclosingMethod)
Creates a new instrumented type with the supplied enclosing method.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withEnclosingMethod(MethodDescription.InDefinedShape enclosingMethod)
Creates a new instrumented type with the supplied enclosing method.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withEnclosingMethod(MethodDescription.InDefinedShape enclosingMethod)
Creates a new instrumented type with the supplied enclosing method.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withEnclosingType(TypeDescription enclosingType)
Creates a new instrumented type with the supplied enclosing type.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withEnclosingType(TypeDescription enclosingType)
Creates a new instrumented type with the supplied enclosing type.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withEnclosingType(TypeDescription enclosingType)
Creates a new instrumented type with the supplied enclosing type.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withField(FieldDescription.Token token)
Creates a new instrumented type that includes a new field.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withField(FieldDescription.Token token)
Creates a new instrumented type that includes a new field.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withField(FieldDescription.Token token)
Creates a new instrumented type that includes a new field.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withInitializer(ByteCodeAppender byteCodeAppender)
Creates a new instrumented type that executes the given initializer in the instrumented type's
type initializer.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withInitializer(ByteCodeAppender byteCodeAppender)
Creates a new instrumented type that executes the given initializer in the instrumented type's
type initializer.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withInitializer(ByteCodeAppender byteCodeAppender)
Creates a new instrumented type that executes the given initializer in the instrumented type's
type initializer.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withInitializer(LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type that includes the given
LoadedTypeInitializer . |
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withInitializer(LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type that includes the given
LoadedTypeInitializer . |
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withInitializer(LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type that includes the given
LoadedTypeInitializer . |
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withInterfaces(TypeList.Generic interfaceTypes)
Creates a new instrumented type with the given interfaces implemented.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withInterfaces(TypeList.Generic interfaceTypes)
Creates a new instrumented type with the given interfaces implemented.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withInterfaces(TypeList.Generic interfaceTypes)
Creates a new instrumented type with the given interfaces implemented.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withLocalClass(boolean localClass)
Creates a new instrumented type that indicates that is defined as a local class.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withLocalClass(boolean localClass)
Creates a new instrumented type that indicates that is defined as a local class.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withLocalClass(boolean localClass)
Creates a new instrumented type that indicates that is defined as a local class.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withMethod(MethodDescription.Token token)
Creates a new instrumented type that includes a new method or constructor.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withMethod(MethodDescription.Token token)
Creates a new instrumented type that includes a new method or constructor.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withMethod(MethodDescription.Token token)
Creates a new instrumented type that includes a new method or constructor.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withModifiers(int modifiers)
Creates a new instrumented type with changed modifiers.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withModifiers(int modifiers)
Creates a new instrumented type with changed modifiers.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withModifiers(int modifiers)
Creates a new instrumented type with changed modifiers.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withName(String name)
Creates a new instrumented type with a changed name.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withName(String name)
Creates a new instrumented type with a changed name.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withName(String name)
Creates a new instrumented type with a changed name.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withNestHost(TypeDescription nestHost)
Creates a new instrumented type with the supplied nest host.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withNestHost(TypeDescription nestHost)
Creates a new instrumented type with the supplied nest host.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withNestHost(TypeDescription nestHost)
Creates a new instrumented type with the supplied nest host.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withNestMembers(TypeList nestMembers)
Creates a new instrumented types with the supplied nest members added to this instrumented type.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withNestMembers(TypeList nestMembers)
Creates a new instrumented types with the supplied nest members added to this instrumented type.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withNestMembers(TypeList nestMembers)
Creates a new instrumented types with the supplied nest members added to this instrumented type.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withTypeVariable(TypeVariableToken typeVariable)
Creates a new instrumented type with the given type variable defined.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withTypeVariable(TypeVariableToken typeVariable)
Creates a new instrumented type with the given type variable defined.
|
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withTypeVariable(TypeVariableToken typeVariable)
Creates a new instrumented type with the given type variable defined.
|
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 |
---|---|
protected DynamicType.Builder<T> |
RedefinitionDynamicTypeBuilder.materialize(InstrumentedType.WithFlexibleName instrumentedType,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
List<? extends DynamicType> auxiliaryTypes) |
protected DynamicType.Builder<T> |
RebaseDynamicTypeBuilder.materialize(InstrumentedType.WithFlexibleName instrumentedType,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
List<? extends DynamicType> auxiliaryTypes) |
Constructor and Description |
---|
AbstractInliningDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
List<? extends DynamicType> auxiliaryTypes,
TypeDescription originalType,
ClassFileLocator classFileLocator)
Creates an inlining dynamic type builder.
|
RebaseDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
TypeDescription originalType,
ClassFileLocator classFileLocator,
MethodNameTransformer methodNameTransformer)
Creates a rebase dynamic type builder.
|
RebaseDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
List<? extends DynamicType> auxiliaryTypes,
TypeDescription originalType,
ClassFileLocator classFileLocator,
MethodNameTransformer methodNameTransformer)
Creates a rebase dynamic type builder.
|
RedefinitionDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
TypeDescription originalType,
ClassFileLocator classFileLocator)
Creates a redefinition dynamic type builder.
|
RedefinitionDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
List<? extends DynamicType> auxiliaryTypes,
TypeDescription originalType,
ClassFileLocator classFileLocator)
Creates a redefinition dynamic type builder.
|
Modifier and Type | Method and Description |
---|---|
protected DynamicType.Builder<T> |
SubclassDynamicTypeBuilder.materialize(InstrumentedType.WithFlexibleName instrumentedType,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
List<? extends DynamicType> auxiliaryTypes) |
Constructor and Description |
---|
SubclassDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
ConstructorStrategy constructorStrategy)
Creates a new type builder for creating a subclass.
|
SubclassDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
Implementation.Context.Factory implementationContextFactory,
MethodGraph.Compiler methodGraphCompiler,
TypeValidation typeValidation,
VisibilityBridgeStrategy visibilityBridgeStrategy,
ClassWriterStrategy classWriterStrategy,
LatentMatcher<? super MethodDescription> ignoredMethods,
List<? extends DynamicType> auxiliaryTypes,
ConstructorStrategy constructorStrategy)
Creates a new type builder for creating a subclass.
|
Copyright © 2014–2020. All rights reserved.