Class ExitCheckAdapter.ExitCheckMethodAdapter

    • Constructor Summary

      Constructors 
      Constructor Description
      ExitCheckMethodAdapter​(org.objectweb.asm.MethodVisitor mv, TransformContext transformContext, int access, java.lang.String name, java.lang.String descriptor, java.lang.String signature, java.lang.String[] exceptions)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void visitInsn​(int opcode)
      we need to identify return instructions which are inserted because of other rules
      void visitLabel​(org.objectweb.asm.Label label)
      each time we visit a label we set or clear flag inhibit depending upon whether the label identifies an EarlyReturnException block or not in order to avoid inserting triggers for returns added by our own exception handling code
      void visitTryCatchBlock​(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, java.lang.String type)
      Visits a try catch block and records the label of the handler start if the exception type EarlyReturnException so we can later avoid inserting a rule trigger.
      • Methods inherited from class org.objectweb.asm.MethodVisitor

        visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitFieldInsn, visitFrame, visitIincInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLdcInsn, visitLineNumber, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMaxs, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTypeAnnotation, visitTypeInsn, visitVarInsn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • access

        private int access
      • name

        private java.lang.String name
      • descriptor

        private java.lang.String descriptor
      • signature

        private java.lang.String signature
      • exceptions

        private java.lang.String[] exceptions
      • startLabels

        private java.util.Vector<org.objectweb.asm.Label> startLabels
      • endLabels

        private java.util.Vector<org.objectweb.asm.Label> endLabels
      • inhibit

        private boolean inhibit
    • Constructor Detail

      • ExitCheckMethodAdapter

        ExitCheckMethodAdapter​(org.objectweb.asm.MethodVisitor mv,
                               TransformContext transformContext,
                               int access,
                               java.lang.String name,
                               java.lang.String descriptor,
                               java.lang.String signature,
                               java.lang.String[] exceptions)
    • Method Detail

      • visitTryCatchBlock

        public void visitTryCatchBlock​(org.objectweb.asm.Label start,
                                       org.objectweb.asm.Label end,
                                       org.objectweb.asm.Label handler,
                                       java.lang.String type)
        Visits a try catch block and records the label of the handler start if the exception type EarlyReturnException so we can later avoid inserting a rule trigger.
        Overrides:
        visitTryCatchBlock in class org.objectweb.asm.MethodVisitor
        Parameters:
        start - beginning of the exception handler's scope (inclusive).
        end - end of the exception handler's scope (exclusive).
        handler - beginning of the exception handler's code.
        type - internal name of the type of exceptions handled by the handler, or null to catch any exceptions (for "finally" blocks).
        Throws:
        java.lang.IllegalArgumentException - if one of the labels has already been visited by this visitor (by the visitLabel method).
      • visitLabel

        public void visitLabel​(org.objectweb.asm.Label label)
        each time we visit a label we set or clear flag inhibit depending upon whether the label identifies an EarlyReturnException block or not in order to avoid inserting triggers for returns added by our own exception handling code
        Overrides:
        visitLabel in class org.objectweb.asm.MethodVisitor
        Parameters:
        label -
      • visitInsn

        public void visitInsn​(int opcode)
        we need to identify return instructions which are inserted because of other rules
        Overrides:
        visitInsn in class org.objectweb.asm.MethodVisitor
        Parameters:
        opcode -