Examples of Ldc


Examples of org.apache.bcel.generic.LDC

        if ((ppsc == null) || (ppsc.length() == 0))
        {
            super.execute();
            return;
        }
        il.append(new LDC(constantPoolGen.addString(ppsc)));
        il.append(
            factory.createInvoke(
                className,
                ClassEnhancer.MN_jdoLoadClass,
                BCELClassEnhancer.OT_CLASS,
View Full Code Here

Examples of org.apache.bcel.generic.LDC

        }
        else if (t instanceof ArrayType)
        {
            String classSig = f.getType().getSignature();
            int cpIndex = constantPoolGen.addString(classSig.replace('/', '.'));
            il.append(new LDC(cpIndex));
            il.append(
                factory.createInvoke(
                    className,
                    ClassEnhancer.MN_jdoLoadClass,
                    BCELClassEnhancer.OT_CLASS,
                    new Type[] { Type.STRING },
                    Constants.INVOKESTATIC));
        }
        else
        {
            int cpIndex = constantPoolGen.addString(((ObjectType)t).getClassName());
            il.append(new LDC(cpIndex));
            il.append(
                factory.createInvoke(
                    className,
                    ClassEnhancer.MN_jdoLoadClass,
                    BCELClassEnhancer.OT_CLASS,
View Full Code Here

Examples of org.apache.bcel.generic.LDC

    protected InstructionHandle createThrowException(String newException, String message)
    {
        InstructionHandle result;
        result = il.append(factory.createNew(newException));
        il.append(InstructionConstants.DUP);
        il.append(new LDC(classGen.getConstantPool().addString(message)));
        il.append(
            factory.createInvoke(
                newException,
                Constants.CONSTRUCTOR_NAME,
                Type.VOID,
View Full Code Here

Examples of org.apache.bcel.generic.LDC

    InstructionList ilist = genMethod.getInstructionList();
    Instruction r=null;
        InstructionHandle new_target=null;
    if (method.isStatic()) {
      ilist.insert(InstructionFactory.MONITORENTER);
      ilist.insert(new LDC(jc.getClassNameIndex()));
     
      ilist.append(new LDC(jc.getClassNameIndex()));
      new_target = ilist.getEnd();
      ilist.append(InstructionFactory.MONITOREXIT);
    } else {
      ilist.insert(InstructionFactory.MONITORENTER);
      ilist.insert(InstructionFactory.ALOAD_0);
View Full Code Here

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

    if (i <= Byte.MAX_VALUE && i >= Byte.MIN_VALUE) {
         inst =  new BIPUSH((byte)i);
    } else if (i <= Short.MAX_VALUE && i >= Short.MIN_VALUE) {
      inst =  new SIPUSH((short)i);
    } else {
      inst =  new LDC(fact.getClassGen().getConstantPool().addInteger(i));
    }
    return inst;
  }
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.