Class AccessControllerPlugin.Initializer

    • Field Detail

      • instrumentedType

        private final TypeDescription instrumentedType
        The instrumented type.
      • name

        private final java.lang.String name
        The name of the field to determine the use of access controller dispatch.
    • Constructor Detail

      • Initializer

        protected Initializer​(TypeDescription instrumentedType,
                              java.lang.String name)
        Creates a new initializer.
        Parameters:
        instrumentedType - The instrumented type.
        name - The name of the field to determine the use of access controller dispatch.
    • Method Detail

      • apply

        public ByteCodeAppender.Size apply​(org.objectweb.asm.MethodVisitor methodVisitor,
                                           Implementation.Context implementationContext,
                                           MethodDescription instrumentedMethod)
        Applies this byte code appender to a type creation process.
        Specified by:
        apply in interface ByteCodeAppender
        Parameters:
        methodVisitor - The method visitor to which the byte code appender writes its code to.
        implementationContext - The implementation context of the current type creation process.
        instrumentedMethod - The method that is the target of the instrumentation.
        Returns:
        The required size for the applied byte code to run.
      • onAccessController

        protected abstract int onAccessController​(org.objectweb.asm.MethodVisitor methodVisitor)
        Invoked to determine if the access controller should be used after the class was found.
        Parameters:
        methodVisitor - The method visitor to dispatch to.
        Returns:
        The size of the stack required to implement the implemented dispatch.