S
- A loaded type that the built type is guaranteed to be a subclass of.public abstract static class DynamicType.Builder.AbstractBase<S> extends Object implements DynamicType.Builder<S>
Modifier and Type | Class and Description |
---|---|
static class |
DynamicType.Builder.AbstractBase.Adapter<U>
An adapter implementation of a dynamic type builder.
|
static class |
DynamicType.Builder.AbstractBase.Delegator<U>
A delegator for a dynamic type builder delegating all invocations to another dynamic type builder.
|
DynamicType.Builder.AbstractBase<S>, DynamicType.Builder.FieldDefinition<S>, DynamicType.Builder.MethodDefinition<S>, DynamicType.Builder.TypeVariableDefinition<S>
Constructor and Description |
---|
AbstractBase() |
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder<S> |
annotateType(Annotation... annotation)
Annotates the instrumented type with the supplied annotations.
|
DynamicType.Builder<S> |
annotateType(AnnotationDescription... annotation)
Annotates the instrumented type with the supplied annotations.
|
DynamicType.Builder<S> |
annotateType(List<? extends Annotation> annotations)
Annotates the instrumented type with the supplied annotations.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> |
constructor(ElementMatcher<? super MethodDescription> matcher)
Matches a constructor that is already declared by the instrumented type.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> |
define(Constructor<?> constructor)
Defines a constructor that is similar to the supplied constructor but without copying any annotations of the constructor or
constructor parameters.
|
DynamicType.Builder.FieldDefinition.Optional.Valuable<S> |
define(Field 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> |
define(FieldDescription field)
Defines a field that is similar to the supplied field but without copying any annotations on the field.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> |
define(Method method)
Defines a method that is similar to the supplied method but without copying any annotations of the method or method parameters.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> |
define(MethodDescription methodDescription)
Defines a method or constructor that is similar to the supplied method description but without copying any annotations of
the method/constructor or method/constructor parameters.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> |
defineConstructor(Collection<? extends ModifierContributor.ForMethod> modifierContributors)
Defines the specified constructor to be declared by the instrumented type.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> |
defineConstructor(ModifierContributor.ForMethod... modifierContributor)
Defines the specified constructor to be declared by the instrumented type.
|
DynamicType.Builder.FieldDefinition.Optional.Valuable<S> |
defineField(String name,
Type type,
Collection<? extends ModifierContributor.ForField> modifierContributors)
Defines the specified field as a field of the built dynamic type.
|
DynamicType.Builder.FieldDefinition.Optional.Valuable<S> |
defineField(String name,
TypeDefinition type,
Collection<? extends ModifierContributor.ForField> modifierContributors)
Defines the specified field as a field of the built dynamic type.
|
DynamicType.Builder.FieldDefinition.Optional.Valuable<S> |
defineField(String name,
TypeDefinition type,
ModifierContributor.ForField... modifierContributor)
Defines the specified field as a field of the built dynamic type.
|
DynamicType.Builder.FieldDefinition.Optional.Valuable<S> |
defineField(String name,
Type type,
int modifiers)
Defines the specified field as a field of the built dynamic type.
|
DynamicType.Builder.FieldDefinition.Optional.Valuable<S> |
defineField(String name,
Type type,
ModifierContributor.ForField... modifierContributor)
Defines the specified field as a field of the built dynamic type.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> |
defineMethod(String name,
Type returnType,
Collection<? extends ModifierContributor.ForMethod> modifierContributors)
Defines the specified method to be declared by the instrumented type.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> |
defineMethod(String name,
TypeDefinition returnType,
Collection<? extends ModifierContributor.ForMethod> modifierContributors)
Defines the specified method to be declared by the instrumented type.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> |
defineMethod(String name,
TypeDefinition returnType,
ModifierContributor.ForMethod... modifierContributor)
Defines the specified method to be declared by the instrumented type.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> |
defineMethod(String name,
Type returnType,
int modifiers)
Defines the specified method to be declared by the instrumented type.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> |
defineMethod(String name,
Type returnType,
ModifierContributor.ForMethod... modifierContributor)
Defines the specified method to be declared by the instrumented type.
|
DynamicType.Builder.FieldDefinition.Optional<S> |
defineProperty(String name,
Type type)
Defines a Java bean property with the specified name.
|
DynamicType.Builder.FieldDefinition.Optional<S> |
defineProperty(String name,
Type type,
boolean readOnly)
Defines a Java bean property with the specified name.
|
DynamicType.Builder.FieldDefinition.Optional<S> |
defineProperty(String name,
TypeDefinition type)
Defines a Java bean property with the specified name.
|
DynamicType.Builder.FieldDefinition.Optional<S> |
defineProperty(String name,
TypeDefinition type,
boolean readOnly)
Defines a Java bean property with the specified name.
|
DynamicType.Builder.FieldDefinition.Valuable<S> |
field(ElementMatcher<? super FieldDescription> matcher)
Matches a field that is already declared by the instrumented type.
|
DynamicType.Builder<S> |
ignoreAlso(ElementMatcher<? super MethodDescription> ignoredMethods)
Specifies to exclude any method that is matched by the supplied matcher from instrumentation.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<S> |
implement(List<? extends Type> interfaceTypes)
Implements the supplied interfaces for the instrumented type.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<S> |
implement(Type... interfaceType)
Implements the supplied interfaces for the instrumented type.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<S> |
implement(TypeDefinition... interfaceType)
Implements the supplied interfaces for the instrumented type.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> |
invokable(ElementMatcher<? super MethodDescription> matcher)
Matches a method or constructor that is already declared or inherited by the instrumented type.
|
DynamicType.Unloaded<S> |
make()
Creates the dynamic type this builder represents.
|
DynamicType.Unloaded<S> |
make(TypePool typePool)
Creates the dynamic type this builder represents.
|
DynamicType.Builder<S> |
merge(ModifierContributor.ForType... modifierContributor)
Merges the supplied modifier contributors with the modifiers of the instrumented type and defines them as the instrumented
type's new modifiers.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> |
method(ElementMatcher<? super MethodDescription> matcher)
Matches a method that is already declared or inherited by the instrumented type.
|
DynamicType.Builder<S> |
modifiers(Collection<? extends ModifierContributor.ForType> modifierContributors)
Defines the supplied modifiers as the modifiers of the instrumented type.
|
DynamicType.Builder<S> |
modifiers(ModifierContributor.ForType... modifierContributor)
Defines the supplied modifiers as the modifiers of the instrumented type.
|
DynamicType.Builder.FieldDefinition.Optional<S> |
serialVersionUid(long serialVersionUid)
Defines a private, static, final field for a serial version UID of the given value.
|
DynamicType.Builder.TypeVariableDefinition<S> |
typeVariable(String symbol)
Defines the supplied type variable without any bounds as a type variable of the instrumented type.
|
DynamicType.Builder.TypeVariableDefinition<S> |
typeVariable(String symbol,
List<? extends Type> bounds)
Defines the supplied type variable with the given bound as a type variable of the instrumented type.
|
DynamicType.Builder.TypeVariableDefinition<S> |
typeVariable(String symbol,
Type... bound)
Defines the supplied type variable with the given bound as a type variable of the instrumented type.
|
DynamicType.Builder.TypeVariableDefinition<S> |
typeVariable(String symbol,
TypeDefinition... bound)
Defines the supplied type variable with the given bound as a type variable of the instrumented type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
annotateType, attribute, defineConstructor, defineField, defineMethod, field, ignoreAlso, implement, initializer, initializer, invokable, make, make, merge, modifiers, name, transform, typeVariable, visit
public DynamicType.Builder<S> annotateType(Annotation... annotation)
DynamicType.Builder
annotateType
in interface DynamicType.Builder<S>
annotation
- The annotations to add to the instrumented type.public DynamicType.Builder<S> annotateType(List<? extends Annotation> annotations)
DynamicType.Builder
annotateType
in interface DynamicType.Builder<S>
annotations
- The annotations to add to the instrumented type.public DynamicType.Builder<S> annotateType(AnnotationDescription... annotation)
DynamicType.Builder
annotateType
in interface DynamicType.Builder<S>
annotation
- The annotations to add to the instrumented type.public DynamicType.Builder<S> modifiers(ModifierContributor.ForType... modifierContributor)
DynamicType.Builder
modifiers
in interface DynamicType.Builder<S>
modifierContributor
- The modifiers of the instrumented type.public DynamicType.Builder<S> modifiers(Collection<? extends ModifierContributor.ForType> modifierContributors)
DynamicType.Builder
modifiers
in interface DynamicType.Builder<S>
modifierContributors
- The modifiers of the instrumented type.public DynamicType.Builder<S> merge(ModifierContributor.ForType... modifierContributor)
DynamicType.Builder
merge
in interface DynamicType.Builder<S>
modifierContributor
- The modifiers of the instrumented type.public DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<S> implement(Type... interfaceType)
DynamicType.Builder
Implements the supplied interfaces for the instrumented type. Optionally, it is possible to define the methods that are defined by the interfaces or the interfaces' super interfaces. This excludes methods that are explicitly ignored.
Note: This methods implements the supplied types as is, i.e. any Class
values are implemented
as raw types if they declare type variables or an owner type.
implement
in interface DynamicType.Builder<S>
interfaceType
- The interface types to implement.public DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<S> implement(List<? extends Type> interfaceTypes)
DynamicType.Builder
Implements the supplied interfaces for the instrumented type. Optionally, it is possible to define the methods that are defined by the interfaces or the interfaces' super interfaces. This excludes methods that are explicitly ignored.
Note: This methods implements the supplied types as is, i.e. any Class
values are implemented
as raw types if they declare type variables or an owner type.
implement
in interface DynamicType.Builder<S>
interfaceTypes
- The interface types to implement.public DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<S> implement(TypeDefinition... interfaceType)
DynamicType.Builder
Implements the supplied interfaces for the instrumented type. Optionally, it is possible to define the methods that are defined by the interfaces or the interfaces' super interfaces. This excludes methods that are explicitly ignored.
Note: This methods implements the supplied types as is, i.e. any TypeDescription
values are
implemented as raw types if they declare type variables or an owner type.
implement
in interface DynamicType.Builder<S>
interfaceType
- The interface types to implement.public DynamicType.Builder.TypeVariableDefinition<S> typeVariable(String symbol)
DynamicType.Builder
typeVariable
in interface DynamicType.Builder<S>
symbol
- The type variable's symbol.public DynamicType.Builder.TypeVariableDefinition<S> typeVariable(String symbol, Type... bound)
DynamicType.Builder
typeVariable
in interface DynamicType.Builder<S>
symbol
- The type variable's symbol.bound
- The type variable's upper bounds. Can also be TargetType
if the bound type
should be equal to the currently instrumented type.public DynamicType.Builder.TypeVariableDefinition<S> typeVariable(String symbol, List<? extends Type> bounds)
DynamicType.Builder
typeVariable
in interface DynamicType.Builder<S>
symbol
- The type variable's symbol.bounds
- The type variable's upper bounds. Can also be TargetType
if the bound type
should be equal to the currently instrumented type.public DynamicType.Builder.TypeVariableDefinition<S> typeVariable(String symbol, TypeDefinition... bound)
DynamicType.Builder
typeVariable
in interface DynamicType.Builder<S>
symbol
- The type variable's symbol.bound
- The type variable's upper bounds. Can also be TargetType
if the bound type
should be equal to the currently instrumented type.public DynamicType.Builder.FieldDefinition.Optional.Valuable<S> defineField(String name, Type type, ModifierContributor.ForField... modifierContributor)
DynamicType.Builder
defineField
in interface DynamicType.Builder<S>
name
- The name of the field.type
- The type of the field. Can also be TargetType
if the field type
should be equal to the currently instrumented type.modifierContributor
- The modifiers of the field.public DynamicType.Builder.FieldDefinition.Optional.Valuable<S> defineField(String name, Type type, Collection<? extends ModifierContributor.ForField> modifierContributors)
DynamicType.Builder
defineField
in interface DynamicType.Builder<S>
name
- The name of the field.type
- The type of the field. Can also be TargetType
if the field type
should be equal to the currently instrumented type.modifierContributors
- The modifiers of the field.public DynamicType.Builder.FieldDefinition.Optional.Valuable<S> defineField(String name, Type type, int modifiers)
DynamicType.Builder
defineField
in interface DynamicType.Builder<S>
name
- The name of the field.type
- The type of the field. Can also be TargetType
if the field type
should be equal to the currently instrumented type.modifiers
- The modifiers of the field.public DynamicType.Builder.FieldDefinition.Optional.Valuable<S> defineField(String name, TypeDefinition type, ModifierContributor.ForField... modifierContributor)
DynamicType.Builder
defineField
in interface DynamicType.Builder<S>
name
- The name of the field.type
- The type of the field. Can also be TargetType
if the field type
should be equal to the currently instrumented type.modifierContributor
- The modifiers of the field.public DynamicType.Builder.FieldDefinition.Optional.Valuable<S> defineField(String name, TypeDefinition type, Collection<? extends ModifierContributor.ForField> modifierContributors)
DynamicType.Builder
defineField
in interface DynamicType.Builder<S>
name
- The name of the field.type
- The type of the field. Can also be TargetType
if the field type
should be equal to the currently instrumented type.modifierContributors
- The modifiers of the field.public DynamicType.Builder.FieldDefinition.Optional.Valuable<S> define(Field field)
DynamicType.Builder
define
in interface DynamicType.Builder<S>
field
- The field to imitate as a field of the instrumented type.public DynamicType.Builder.FieldDefinition.Optional.Valuable<S> define(FieldDescription field)
DynamicType.Builder
define
in interface DynamicType.Builder<S>
field
- The field to imitate as a field of the instrumented type.public DynamicType.Builder.FieldDefinition.Optional<S> serialVersionUid(long serialVersionUid)
DynamicType.Builder
serialVersionUid
in interface DynamicType.Builder<S>
serialVersionUid
- The serial version UID to define as a value.public DynamicType.Builder.FieldDefinition.Valuable<S> field(ElementMatcher<? super FieldDescription> matcher)
DynamicType.Builder
Matches a field that is already declared by the instrumented type. This gives opportunity to change that field's default value, annotations or custom attributes.
When a type is redefined or rebased, any annotations that the field declared previously is preserved
as it is if Byte Buddy is configured to retain such annotations by
AnnotationRetention.ENABLED
. If any existing annotations should be
altered, annotation retention must be disabled.
If a field is already matched by a previously specified field matcher, the new field definition gets precedence over the previous definition, i.e. the previous field definition is no longer applied.
field
in interface DynamicType.Builder<S>
matcher
- The matcher that determines what declared fields are affected by the subsequent specification.public DynamicType.Builder<S> ignoreAlso(ElementMatcher<? super MethodDescription> ignoredMethods)
DynamicType.Builder
Specifies to exclude any method that is matched by the supplied matcher from instrumentation. Previously supplied matchers remain valid after supplying a new matcher, i.e. any method that is matched by a previously supplied matcher is always ignored.
When ignoring a type, previously registered matchers are applied before this matcher. If a previous matcher indicates that a type is to be ignored, this matcher is no longer executed.
ignoreAlso
in interface DynamicType.Builder<S>
ignoredMethods
- The matcher for determining what methods to exclude from instrumentation.public DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> defineMethod(String name, Type returnType, ModifierContributor.ForMethod... modifierContributor)
DynamicType.Builder
defineMethod
in interface DynamicType.Builder<S>
name
- The name of the method.returnType
- The method's return type. Can also be TargetType
if the return type
should be equal to the currently instrumented type.modifierContributor
- The method's modifiers.public DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> defineMethod(String name, Type returnType, Collection<? extends ModifierContributor.ForMethod> modifierContributors)
DynamicType.Builder
defineMethod
in interface DynamicType.Builder<S>
name
- The name of the method.returnType
- The method's return type. Can also be TargetType
if the return type
should be equal to the currently instrumented type.modifierContributors
- The method's modifiers.public DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> defineMethod(String name, Type returnType, int modifiers)
DynamicType.Builder
defineMethod
in interface DynamicType.Builder<S>
name
- The name of the method.returnType
- The method's return type. Can also be TargetType
if the return type
should be equal to the currently instrumented type.modifiers
- The method's modifiers.public DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> defineMethod(String name, TypeDefinition returnType, ModifierContributor.ForMethod... modifierContributor)
DynamicType.Builder
defineMethod
in interface DynamicType.Builder<S>
name
- The name of the method.returnType
- The method's return type. Can also be TargetType
if the return type
should be equal to the currently instrumented type.modifierContributor
- The method's modifiers.public DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> defineMethod(String name, TypeDefinition returnType, Collection<? extends ModifierContributor.ForMethod> modifierContributors)
DynamicType.Builder
defineMethod
in interface DynamicType.Builder<S>
name
- The name of the method.returnType
- The method's return type. Can also be TargetType
if the return type
should be equal to the currently instrumented type.modifierContributors
- The method's modifiers.public DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> defineConstructor(ModifierContributor.ForMethod... modifierContributor)
DynamicType.Builder
defineConstructor
in interface DynamicType.Builder<S>
modifierContributor
- The constructor's modifiers.public DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<S> defineConstructor(Collection<? extends ModifierContributor.ForMethod> modifierContributors)
DynamicType.Builder
defineConstructor
in interface DynamicType.Builder<S>
modifierContributors
- The constructor's modifiers.public DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> define(Method method)
DynamicType.Builder
define
in interface DynamicType.Builder<S>
method
- The method to imitate as a method of the instrumented type.public DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> define(Constructor<?> constructor)
DynamicType.Builder
define
in interface DynamicType.Builder<S>
constructor
- The constructor to imitate as a method of the instrumented type.public DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> define(MethodDescription methodDescription)
DynamicType.Builder
define
in interface DynamicType.Builder<S>
methodDescription
- The method description to imitate as a method or constructor of the instrumented type.public DynamicType.Builder.FieldDefinition.Optional<S> defineProperty(String name, Type type)
DynamicType.Builder
defineProperty
in interface DynamicType.Builder<S>
name
- The name of the property.type
- The property type.public DynamicType.Builder.FieldDefinition.Optional<S> defineProperty(String name, Type type, boolean readOnly)
DynamicType.Builder
defineProperty
in interface DynamicType.Builder<S>
name
- The name of the property.type
- The property type.readOnly
- true
if the property is read only, i.e. no setter should be defined and the field should be final
.public DynamicType.Builder.FieldDefinition.Optional<S> defineProperty(String name, TypeDefinition type)
DynamicType.Builder
defineProperty
in interface DynamicType.Builder<S>
name
- The name of the property.type
- The property type.public DynamicType.Builder.FieldDefinition.Optional<S> defineProperty(String name, TypeDefinition type, boolean readOnly)
DynamicType.Builder
defineProperty
in interface DynamicType.Builder<S>
name
- The name of the property.type
- The property type.readOnly
- true
if the property is read only, i.e. no setter should be defined and the field should be final
.public DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> method(ElementMatcher<? super MethodDescription> matcher)
DynamicType.Builder
Matches a method that is already declared or inherited by the instrumented type. This gives opportunity to change or to override that method's implementation, default value, annotations or custom attributes. It is also possible to make a method abstract.
When a type is redefined or rebased, any annotations that the method declared previously is preserved
as it is if Byte Buddy is configured to retain such annotations by
AnnotationRetention.ENABLED
. If any existing annotations should be
altered, annotation retention must be disabled.
If a method is already matched by a previously specified matcher, the new method definition gets precedence over the previous definition, i.e. the previous method definition is no longer applied.
Note that the specified definition does never apply for methods that are explicitly ignored.
method
in interface DynamicType.Builder<S>
matcher
- The matcher that determines what methods are affected by the subsequent specification.public DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> constructor(ElementMatcher<? super MethodDescription> matcher)
DynamicType.Builder
Matches a constructor that is already declared by the instrumented type. This gives opportunity to change that constructor's implementation, default value, annotations or custom attributes.
When a type is redefined or rebased, any annotations that the constructor declared previously is preserved
as it is if Byte Buddy is configured to retain such annotations by
AnnotationRetention.ENABLED
. If any existing annotations should be
altered, annotation retention must be disabled.
If a constructor is already matched by a previously specified matcher, the new constructor definition gets precedence over the previous definition, i.e. the previous constructor definition is no longer applied.
Note that the specified definition does never apply for methods that are explicitly ignored.
constructor
in interface DynamicType.Builder<S>
matcher
- The matcher that determines what constructors are affected by the subsequent specification.public DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> invokable(ElementMatcher<? super MethodDescription> matcher)
DynamicType.Builder
Matches a method or constructor that is already declared or inherited by the instrumented type. This gives opportunity to change or to override that method's or constructor's implementation, default value, annotations or custom attributes. It is also possible to make a method abstract.
When a type is redefined or rebased, any annotations that the method or constructor declared previously is preserved
as it is if Byte Buddy is configured to retain such annotations by
AnnotationRetention.ENABLED
. If any existing annotations should be
altered, annotation retention must be disabled.
If a method or constructor is already matched by a previously specified matcher, the new definition gets precedence over the previous definition, i.e. the previous definition is no longer applied.
Note that the specified definition does never apply for methods that are explicitly ignored.
Important: It is possible to instrument the dynamic type's initializer. Depending on the used TypeResolutionStrategy
,
the type initializer might be run before Byte Buddy could apply any LoadedTypeInitializer
s which are
responsible for preparing the instrumented type prior to the initializer's execution. For preparing the type prior to
executing the initializer, an TypeResolutionStrategy.Active
resolver must be chosen.
invokable
in interface DynamicType.Builder<S>
matcher
- The matcher that determines what methods or constructors are affected by the subsequent specification.public DynamicType.Unloaded<S> make(TypePool typePool)
DynamicType.Builder
Creates the dynamic type this builder represents. If the specified dynamic type is not legal, an IllegalStateException
is thrown.
The dynamic type is initialized using a TypeResolutionStrategy.Passive
strategy. Using this strategy, no
LoadedTypeInitializer
is run during the execution of the type's initializer such that no Implementation
used for
executing the initializer must rely on such an initializer.
make
in interface DynamicType.Builder<S>
typePool
- A type pool that is used for computing stack map frames by the underlying class writer, if required.public DynamicType.Unloaded<S> make()
DynamicType.Builder
Creates the dynamic type this builder represents. If the specified dynamic type is not legal, an IllegalStateException
is thrown.
Other than DynamicType.Builder.make(TypePool)
, this method supplies a context-dependant type pool to the underlying class writer.
Supplying a type pool only makes sense if custom byte code is created by adding a custom AsmVisitorWrapper
where ASM might be
required to compute stack map frames by processing information over any mentioned type's class hierarchy.
The dynamic type is initialized using a TypeResolutionStrategy.Passive
strategy. Using this strategy, no
LoadedTypeInitializer
is run during the execution of the type's initializer such that no Implementation
used for
executing the initializer must rely on such an initializer.
make
in interface DynamicType.Builder<S>
Copyright © 2014–2017. All rights reserved.