Package org.apache.bcel.classfile

Examples of org.apache.bcel.classfile.ConstantCP


    CPInstruction methodCall =
      (CPInstruction)invoke.getInstruction();
   
    // get infos from the constant pool:
   
    ConstantCP methodConst =
      (ConstantCP)constPoolGen.getConstant(
          methodCall.getIndex() );
   
    ConstantClass classConst =
      (ConstantClass)constPoolGen.getConstant(
        methodConst.getClassIndex() );

    ConstantNameAndType ntConst =
      (ConstantNameAndType)constPoolGen.getConstant(
        methodConst.getNameAndTypeIndex() );
   
      return new CallInfo(
      ((ConstantUtf8)constPoolGen.getConstant(
        classConst.getNameIndex() )).getBytes(),
      ntConst.getName( constPoolGen.getConstantPool() ),
View Full Code Here


        insList.append(new GOTO(handle));
        return insList;
    }

    private ObjectType getObjectType(ConstantPool cp, int index) {
        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
        String sig = cp.getConstantString(cmr.getClassIndex(), Constants.CONSTANT_Class);
        return new ObjectType(sig.replace('/', '.'));
    }
View Full Code Here

        String sig = cp.getConstantString(cmr.getClassIndex(), Constants.CONSTANT_Class);
        return new ObjectType(sig.replace('/', '.'));
    }

    private Type[] getParamTypes(ConstantPool cp, int index) {
        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
        String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
        return Type.getArgumentTypes(sig);
    }
View Full Code Here

        String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
        return Type.getArgumentTypes(sig);
    }

    private Type getReturnType(ConstantPool cp, int index) {
        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
        String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
        return Type.getReturnType(sig);
    }
View Full Code Here

        insList.append(new GOTO(handle));
        return insList;
    }

    private ObjectType getObjectType(ConstantPool cp, int index) {
        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
        String sig = cp.getConstantString(cmr.getClassIndex(), Constants.CONSTANT_Class);
        return new ObjectType(sig.replace('/', '.'));
    }
View Full Code Here

        String sig = cp.getConstantString(cmr.getClassIndex(), Constants.CONSTANT_Class);
        return new ObjectType(sig.replace('/', '.'));
    }

    private Type[] getParamTypes(ConstantPool cp, int index) {
        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
        String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
        return Type.getArgumentTypes(sig);
    }
View Full Code Here

        String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
        return Type.getArgumentTypes(sig);
    }

    private Type getReturnType(ConstantPool cp, int index) {
        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
        String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
        return Type.getReturnType(sig);
    }
View Full Code Here

        insList.append(new GOTO(handle));
        return insList;
    }

    private ObjectType getObjectType(ConstantPool cp, int index) {
        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
        String sig = cp.getConstantString(cmr.getClassIndex(), Constants.CONSTANT_Class);
        return new ObjectType(sig.replace('/', '.'));
    }
View Full Code Here

        String sig = cp.getConstantString(cmr.getClassIndex(), Constants.CONSTANT_Class);
        return new ObjectType(sig.replace('/', '.'));
    }

    private Type[] getParamTypes(ConstantPool cp, int index) {
        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
        String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
        return Type.getArgumentTypes(sig);
    }
View Full Code Here

        String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
        return Type.getArgumentTypes(sig);
    }

    private Type getReturnType(ConstantPool cp, int index) {
        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
        String sig = ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
        return Type.getReturnType(sig);
    }
View Full Code Here

TOP

Related Classes of org.apache.bcel.classfile.ConstantCP

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.