Package org.apache.bcel.classfile

Examples of org.apache.bcel.classfile.ConstantClass


            for (Iterator iit = introductionDef.getInterfaceClassNames().iterator(); iit.hasNext();) {
                String className = (String) iit.next();

                boolean addInterface = true;
                for (int l = 0; l < interfaces.length; l++) {
                    ConstantClass cc = (ConstantClass)cpg.getConstant(interfaces[l]);
                    ConstantUtf8 cu = (ConstantUtf8)cpg.getConstant(cc.getNameIndex());

                    if (implementsInterface(cu, className)) {
                        addInterface = false;
                        break;
                    }
View Full Code Here


            String interfaceName = def.getIntroductionInterfaceName(introductionName);

            boolean addInterface = true;

            for (int l = 0; l < interfaces.length; l++) {
                ConstantClass cc = (ConstantClass)cpg.getConstant(interfaces[l]);
                ConstantUtf8 cu = (ConstantUtf8)cpg.getConstant(cc.getNameIndex());

                if (IntroductionTransformer.implementsInterface(cu, interfaceName)) {
                    addInterface = false;
                    break;
                }
View Full Code Here

        final int[] interfaces = cg.getInterfaces();
        final String interfaceName = TransformationUtil.META_DATA_INTERFACE;

        boolean addInterface = true;
        for (int i = 0; i < interfaces.length; i++) {
            final ConstantClass cc = (ConstantClass)cpg.getConstant(interfaces[i]);
            final ConstantUtf8 cu = (ConstantUtf8)cpg.getConstant(cc.getNameIndex());

            if (implementsInterface(cu, interfaceName)) {
                addInterface = false;
                break;
            }
View Full Code Here

         // An index of 0 means ANY.
         iClassRecord = aBinary.getClassRecord("java/lang/Throwable");
      }
      else
      {
         ConstantClass pCls = (ConstantClass) aCF.getConstantPool()
            .getConstant(pCPIndex);
         String pName = pCls.getBytes(aCF.getConstantPool());
         iClassRecord = aBinary.getClassRecord(pName);
      }
      if (iClassRecord == null)
      {
         throw new TinyVMException("Exception not found: " + iExcep);
View Full Code Here

      {
         throw new TinyVMException("Classfile error: Instruction requiring "
            + "CONSTANT_Class entry got "
            + (pEntry == null? "null" : pEntry.getClass().getName()));
      }
      ConstantClass pClassEntry = (ConstantClass) pEntry;
      return getClassRecord(pClassEntry.getBytes(iCF.getConstantPool()));
   }
View Full Code Here

    ConstantPool cp=jc.getConstantPool();
    Constant[] c=cp.getConstantPool();
    for (int i=0; i< c.length; i++) {
      if (c[i]==null) continue;
      if (c[i].getTag()==Constants.CONSTANT_Class) {
        ConstantClass cc= (ConstantClass)c[i];
        String classname=cc.getBytes(cp);
        new Compile2Data(classname).link()
      }
    }
 
  }
View Full Code Here

    Constant[] cons=cp.getConstantPool();
    Set<String> incSet=new HashSet<String>();
    for (int i=0; i< cons.length; i++) {
      if (cons[i]==null) continue;
      if (cons[i].getTag()==Constants.CONSTANT_Class) {
        ConstantClass cc= (ConstantClass)cons[i];
        String include=cc.getBytes(cp);
        if (!singleFile) {
                  outc.println("//                  "+include);
        }
                includeThis(incSet, include);
      }
View Full Code Here

    ConstantPool cp=jc.getConstantPool();
    Constant[] c=cp.getConstantPool();
    for (int i=0; i< c.length; i++) {
      if (c[i]==null) continue;
      if (c[i].getTag()==Constants.CONSTANT_Class) {
        ConstantClass cc= (ConstantClass)c[i];
        Compile2C jp=new Compile2C(cc.getBytes(cp));
        jp.compile();
      }
    }
 
  }
View Full Code Here

    ConstantPool cp=jc.getConstantPool();
    Constant[] c=cp.getConstantPool();
    for (int i=0; i< c.length; i++) {
      if (c[i]==null) continue;
      if (c[i].getTag()==Constants.CONSTANT_Class) {
        ConstantClass cc= (ConstantClass)c[i];
        String include=cc.getBytes(cp);
        if (!include.startsWith("[")) {
          String inc="#include \""+filename(include)+".h\"";
          outc.println(inc);
          CollectedIncludes.put(inc);
          File cf=new File(HaikuDefs.getProperty("APP_BASE")+"/"+filename(include)+".h");
View Full Code Here

        final int[] interfaces = cg.getInterfaces();
        final String interfaceName = TransformationUtil.IDENTIFIABLE_INTERFACE;

        boolean addInterface = true;
        for (int i = 0; i < interfaces.length; i++) {
            final ConstantClass cc = (ConstantClass)cpg.getConstant(interfaces[i]);
            final ConstantUtf8 cu = (ConstantUtf8)cpg.getConstant(cc.getNameIndex());

            if (implementsInterface(cu, interfaceName)) {
                addInterface = false;
                break;
            }
View Full Code Here

TOP

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

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.