Examples of InstructionHandle


Examples of org.aspectj.apache.bcel.generic.InstructionHandle

  /**
   * Returns null if this is not a Java constructor, and then we won't weave into it at all
   */
  private InstructionHandle findSuperOrThisCall(LazyMethodGen mg) {
    int depth = 1;
    InstructionHandle start = mg.getBody().getStart();
    while (true) {
      if (start == null) {
        return null;
      }

      Instruction inst = start.getInstruction();
      if (inst.opcode == Constants.INVOKESPECIAL && ((InvokeInstruction) inst).getName(cpg).equals("<init>")) {
        depth--;
        if (depth == 0) {
          return start;
        }
      } else if (inst.opcode == Constants.NEW) {
        depth++;
      }
      start = start.getNext();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.