Package com.sun.org.apache.bcel.internal.generic

Examples of com.sun.org.apache.bcel.internal.generic.ObjectType


      throws GenerationError {
    for(ExceptionHandler ehandler: ilc.exceptionHandlers) {
      InstructionHandle handler_pc = ilc.resolveMark(ehandler.handler) ;
      InstructionHandle start_pc = ilc.resolveMark(ehandler.startRegion) ;
      InstructionHandle end_pc = ilc.resolveMark(ehandler.endRegion) ;
      ObjectType catch_type = new ObjectType(ehandler.exceptionType.toString()) ;
      mgen.addExceptionHandler(start_pc, end_pc, handler_pc, catch_type) ;
    }
  }
View Full Code Here


    case FLOAT: return Type.FLOAT ;
    case INT: return Type.INT ;
    case LONG: return Type.LONG ;
    case SHORT: return Type.SHORT ;
    case VOID: return Type.VOID ;
    case OBJECT: return new ObjectType(type.className) ;
    }
    throw new IllegalArgumentException() ;
  }
View Full Code Here

      return ;
    case LONG:
      createMappedBoolean(ilc, TypeCode.BOOLEAN, Long.valueOf(1), Long.valueOf(0));
      return ;
    case OBJECT:
      Type ret_type = new ObjectType("java.lang.Boolean") ;
      Type[] args= new Type[]{Type.BOOLEAN} ;
      ilc.add(ilc.getInstructionFactory().createInvoke("java.lang.Boolean", "valueOf", ret_type, args, Constants.INVOKESTATIC)) ;
      return ;
    default: throw new IllegalArgumentException() ;
    }
View Full Code Here

    case LONG: ilc.add(InstructionConstants.I2L) ; return;
    case DOUBLE: ilc.add(InstructionConstants.I2D) ; return;
    case FLOAT: ilc.add(InstructionConstants.I2F) ; return;
    case VOID: ilc.add(InstructionConstants.POP) ; return;
    case OBJECT:
      Type ret_type = new ObjectType("java.lang.Character") ;
      Type[] args= new Type[]{Type.CHAR} ;
      ilc.add(ilc.getInstructionFactory().createInvoke("java.lang.Character", "valueOf", ret_type, args, Constants.INVOKESTATIC)) ;
      return ;
    default: throw new IllegalArgumentException() ;
    }
View Full Code Here

    case LONG: ilc.add(InstructionConstants.I2L) ; return;
    case DOUBLE: ilc.add(InstructionConstants.I2D) ; return;
    case FLOAT: ilc.add(InstructionConstants.I2F) ; return;
    case VOID: ilc.add(InstructionConstants.POP) ; return;
    case OBJECT:
      Type ret_type = new ObjectType("java.lang.Short") ;
      Type[] args= new Type[]{Type.SHORT} ;
      ilc.add(ilc.getInstructionFactory().createInvoke("java.lang.Short", "valueOf", ret_type, args, Constants.INVOKESTATIC)) ;
      return ;
    default: throw new IllegalArgumentException() ;
    }
View Full Code Here

    case LONG: ilc.add(InstructionConstants.I2L) ; return;
    case DOUBLE: ilc.add(InstructionConstants.I2D) ; return;
    case FLOAT: ilc.add(InstructionConstants.I2F) ; return;
    case VOID: ilc.add(InstructionConstants.POP) ; return;
    case OBJECT:
      Type ret_type = new ObjectType("java.lang.Byte") ;
      Type[] args= new Type[]{Type.BYTE} ;
      ilc.add(ilc.getInstructionFactory().createInvoke("java.lang.Byte", "valueOf", ret_type, args, Constants.INVOKESTATIC)) ;
      return ;
    default: throw new IllegalArgumentException() ;
    }
View Full Code Here

    case LONG: ilc.add(InstructionConstants.I2L) ; return;
    case DOUBLE: ilc.add(InstructionConstants.I2D) ; return;
    case FLOAT: ilc.add(InstructionConstants.I2F) ; return;
    case VOID: ilc.add(InstructionConstants.POP) ; return;
    case OBJECT:
        Type ret_type = new ObjectType("java.lang.Integer") ;
        Type[] args= new Type[]{Type.INT} ;
        ilc.add(ilc.getInstructionFactory().createInvoke("java.lang.Integer", "valueOf", ret_type, args, Constants.INVOKESTATIC)) ;
        return ;
    default: throw new IllegalArgumentException() ;
    }
View Full Code Here

    case INT: ilc.add(InstructionConstants.L2I) ; return;
    case DOUBLE: ilc.add(InstructionConstants.L2D) ; return;
    case FLOAT: ilc.add(InstructionConstants.L2F) ; return;
    case VOID: ilc.add(InstructionConstants.POP2) ; return;
    case OBJECT:
      Type ret_type = new ObjectType("java.lang.Long") ;
      Type[] args= new Type[]{Type.LONG} ;
      ilc.add(ilc.getInstructionFactory().createInvoke("java.lang.Long", "valueOf", ret_type, args, Constants.INVOKESTATIC)) ;
      return ;
    default: throw new IllegalArgumentException() ;
    }
View Full Code Here

    case INT: ilc.add(InstructionConstants.F2I) ; return;
    case DOUBLE: ilc.add(InstructionConstants.F2D) ; return;
    case LONG: ilc.add(InstructionConstants.F2L) ; return;
    case VOID: ilc.add(InstructionConstants.POP) ; return;
    case OBJECT:
      Type ret_type = new ObjectType("java.lang.Float") ;
      Type[] args= new Type[]{Type.FLOAT} ;
      ilc.add(ilc.getInstructionFactory().createInvoke("java.lang.Float", "valueOf", ret_type, args, Constants.INVOKESTATIC)) ;
      return ;
    default: throw new IllegalArgumentException() ;
    }
View Full Code Here

    case INT: ilc.add(InstructionConstants.D2I) ; return;
    case FLOAT: ilc.add(InstructionConstants.D2F) ; return;
    case LONG: ilc.add(InstructionConstants.D2L) ; return;
    case VOID: ilc.add(InstructionConstants.POP2) ; return;
    case OBJECT:
      Type ret_type = new ObjectType("java.lang.Double") ;
      Type[] args= new Type[]{Type.DOUBLE} ;
      ilc.add(ilc.getInstructionFactory().createInvoke("java.lang.Double", "valueOf", ret_type, args, Constants.INVOKESTATIC)) ;
      return ;
    default: throw new IllegalArgumentException() ;
    }
View Full Code Here

TOP

Related Classes of com.sun.org.apache.bcel.internal.generic.ObjectType

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.