Class ByteCodeVerifier

  • All Implemented Interfaces:
    OpCode

    public class ByteCodeVerifier
    extends OpCodeUtil
    • Field Detail

      • returnAddress

        private static final javax.lang.model.type.TypeMirror returnAddress
      • opCodePosition

        private int opCodePosition
      • goneThrough

        private java.util.Set<java.lang.Integer> goneThrough
      • stackAt

        private java.util.Map<java.lang.Integer,​java.util.Deque<javax.lang.model.type.TypeMirror>> stackAt
      • lvAt

        private java.util.Map<java.lang.Integer,​javax.lang.model.type.TypeMirror[]> lvAt
      • maxLocal

        private int maxLocal
      • maxStack

        private int maxStack
      • code

        private byte[] code
      • coverage

        private boolean[] coverage
      • lvType

        private javax.lang.model.type.TypeMirror[] lvType
    • Method Detail

      • verify

        public void verify()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • compare

        private boolean compare​(javax.lang.model.type.TypeMirror[] lvBefore,
                                javax.lang.model.type.TypeMirror[] lvNow)
      • run

        private int run​(ByteCodeVerifier.Context ctx)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • verify

        private void verify​(javax.lang.model.type.TypeMirror assignee,
                            javax.lang.model.type.TypeMirror assignable)
      • verify1

        private void verify1​(javax.lang.model.type.TypeMirror cls)
      • verify2

        private void verify2​(javax.lang.model.type.TypeMirror cls)
      • c1

        private boolean c1​(javax.lang.model.type.TypeMirror cls)
      • c2

        private boolean c2​(javax.lang.model.type.TypeMirror cls)
      • getMaxStack

        public int getMaxStack()
      • getLocalType

        private javax.lang.model.type.TypeMirror getLocalType​(int index)
      • verifyLocalType

        private void verifyLocalType​(int index,
                                     javax.lang.model.type.TypeMirror cls)
      • verifyClass

        private void verifyClass​(javax.lang.model.type.TypeMirror objectRef,
                                 javax.lang.model.element.ExecutableElement method)
      • verifyVirtualClass

        private void verifyVirtualClass​(javax.lang.model.type.TypeMirror objectRef,
                                        javax.lang.model.element.ExecutableElement method)
      • verifyInterfaceClass

        private void verifyInterfaceClass​(javax.lang.model.type.TypeMirror objectRef,
                                          javax.lang.model.element.ExecutableElement method)
      • verifyReferenceOrArray

        private void verifyReferenceOrArray​(javax.lang.model.type.TypeMirror cw)
      • verifyByteOrBoolean

        private void verifyByteOrBoolean​(javax.lang.model.type.TypeMirror cw)
      • verifyByteOrBooleanArray

        private void verifyByteOrBooleanArray​(javax.lang.model.type.TypeMirror cw)
      • getIndexedVariable

        private javax.lang.model.element.VariableElement getIndexedVariable​(int i)
      • getIndexedExecutable

        private javax.lang.model.element.ExecutableElement getIndexedExecutable​(int i)
      • getIndexedType

        private javax.lang.model.type.TypeMirror getIndexedType​(int i)
      • verifyMethod

        public static void verifyMethod​(java.util.Deque<javax.lang.model.type.TypeMirror> stack,
                                        javax.lang.model.element.ExecutableElement method)
                                 throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException