Package org.aspectj.apache.bcel.classfile

Examples of org.aspectj.apache.bcel.classfile.CodeException


   * called for the instruction list.
   *
   * @param cp constant pool
   */
  public CodeException getCodeException(ConstantPool cp) {
    return new CodeException(start_pc.getPosition(),
           end_pc.getPosition() + end_pc.getInstruction().getLength(),
           handler_pc.getPosition(),
           (catch_type == null)? 0 : cp.addClass(catch_type));
  }
View Full Code Here


   * called for the instruction list.
   *
   * @param cp constant pool
   */
  public CodeException getCodeException(ConstantPoolGen cp) {
    return new CodeException(start_pc.getPosition(),
           end_pc.getPosition() + end_pc.getInstruction().getLength(),
           handler_pc.getPosition(),
           (catch_type == null)? 0 : cp.addClass(catch_type));
  }
View Full Code Here

 
  CodeException[] ces = c.getExceptionTable();
 
  if(ces != null) {
    for(int j=0; j < ces.length; j++) {
            CodeException ce     = ces[j];
            int           type   = ce.getCatchType();
            ObjectType    c_type = null;

      if(type > 0) {
        String cen = m.getConstantPool().getConstantString(type, Constants.CONSTANT_Class);
        c_type = new ObjectType(cen);
      }

      int end_pc = ce.getEndPC();
      int length = m.getCode().getCode().length;
     
      InstructionHandle end;

      if(length == end_pc) { // May happen, because end_pc is exclusive
        end = il.getEnd();
      } else {
        end = il.findHandle(end_pc);
        end = end.getPrev(); // Make it inclusive
      }

      addExceptionHandler(il.findHandle(ce.getStartPC()), end,
        il.findHandle(ce.getHandlerPC()), c_type);
    }
  }

  Attribute[] c_attributes = c.getAttributes();
  for(int j=0; j < c_attributes.length; j++) {
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.classfile.CodeException

Copyright © 2018 www.massapicom. 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.