Package net.bytebuddy.build
Class AccessControllerPlugin.Initializer.WithProperty
java.lang.Object
net.bytebuddy.build.AccessControllerPlugin.Initializer
net.bytebuddy.build.AccessControllerPlugin.Initializer.WithProperty
- All Implemented Interfaces:
ByteCodeAppender
- Enclosing class:
AccessControllerPlugin.Initializer
@Enhance
protected static class AccessControllerPlugin.Initializer.WithProperty
extends AccessControllerPlugin.Initializer
An initializer that uses a property to determine if the access controller should be actually used even if it is available.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.build.AccessControllerPlugin.Initializer
AccessControllerPlugin.Initializer.WithoutProperty, AccessControllerPlugin.Initializer.WithProperty
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.ByteCodeAppender
ByteCodeAppender.Compound, ByteCodeAppender.Simple, ByteCodeAppender.Size
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
WithProperty
(TypeDescription instrumentedType, String name, String property) Creates an initializer that uses a property to determine if the access controller should be actually used even if it is available. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
onAccessController
(org.objectweb.asm.MethodVisitor methodVisitor) Invoked to determine if the access controller should be used after the class was found.Methods inherited from class net.bytebuddy.build.AccessControllerPlugin.Initializer
apply
-
Field Details
-
property
The name of the property.
-
-
Constructor Details
-
WithProperty
Creates an initializer that uses a property to determine if the access controller should be actually used even if it is available.- Parameters:
instrumentedType
- The instrumented type.name
- The name of the field to determine the use of access controller dispatch.property
- The name of the property.
-
-
Method Details
-
onAccessController
protected int onAccessController(org.objectweb.asm.MethodVisitor methodVisitor) Description copied from class:AccessControllerPlugin.Initializer
Invoked to determine if the access controller should be used after the class was found.- Specified by:
onAccessController
in classAccessControllerPlugin.Initializer
- Parameters:
methodVisitor
- The method visitor to dispatch to.- Returns:
- The size of the stack required to implement the implemented dispatch.
-