Examples of Synthetic


Examples of org.apache.bcel.classfile.Synthetic

        m_isWritable = true;
        m_genClass = new ClassGen(name, sclas.getName(), "",
            access | SYNTHETIC_ACCESS_FLAG, impls);
        m_genPool = m_genClass.getConstantPool();
        int index = m_genPool.addUtf8("Synthetic");
        m_genClass.addAttribute(new Synthetic(index, 0, EMPTY_BYTES,
            m_genPool.getConstantPool()));
        m_instBuilder = new InstructionBuilder(m_genClass, m_genPool);
        m_itemMap = new HashMap();
        initInterface();
        ClassCache.addClassFile(this);
View Full Code Here

Examples of org.apache.bcel.classfile.Synthetic

        MethodGen mg = new MethodGen(
                Constants.ACC_FINAL | Constants.ACC_PUBLIC, methodReturnType,
                methodArgTypes, null, // arg names
                handlerGetName, clazz.getClassName(), il, cp);

        mg.addAttribute(new Synthetic(cp.addUtf8("Synthetic"), 0, null, cp
                .getConstantPool()));

        //
        // construct method body
        //
View Full Code Here

Examples of org.apache.bcel.classfile.Synthetic

        MethodGen mg = new MethodGen(
                Constants.ACC_FINAL | Constants.ACC_PUBLIC, methodReturnType,
                methodArgTypes, null, // arg names
                method.getName(), clazz.getClassName(), il, cp);

        mg.addAttribute(new Synthetic(cp.addUtf8("Synthetic"), 0, null, cp
                .getConstantPool()));

        Class[] throwsException = method.getExceptionTypes();
        for (int i = 0; i < throwsException.length; i++) {
            mg.addException(throwsException[i].getName());
View Full Code Here

Examples of org.apache.bcel.classfile.Synthetic

        MethodGen mg = new MethodGen(
                Constants.ACC_FINAL | Constants.ACC_PUBLIC, methodReturnType,
                methodArgTypes, null, // arg names
                method.getName(), clazz.getClassName(), il, cp);

        mg.addAttribute(new Synthetic(cp.addUtf8("Synthetic"), 0, null, cp
                .getConstantPool()));

        Class[] throwsException = method.getExceptionTypes();
        for (int i = 0; i < throwsException.length; i++) {
            mg.addException(throwsException[i].getName());
View Full Code Here

Examples of org.apache.bcel.classfile.Synthetic

     * @param constantPoolGen target ConstantPoolGen instance
     */
    public static void addSynthetic(FieldOrMethod m, ConstantPoolGen constantPoolGen)
    {
        int index = constantPoolGen.addUtf8("Synthetic");
        Synthetic syn =
            new Synthetic(index, 0, new byte[] { Constants.ATTR_SYNTHETIC }, m.getConstantPool());

        Attribute originalAttrs[] = m.getAttributes();
        Attribute attrs[];
        if ((originalAttrs == null) || (originalAttrs.length == 0))
        {
View Full Code Here

Examples of org.apache.bcel.classfile.Synthetic

        MethodGen mg = new MethodGen(
                Constants.ACC_FINAL | Constants.ACC_PUBLIC, methodReturnType,
                methodArgTypes, null, // arg names
                handlerGetName, clazz.getClassName(), il, cp);

        mg.addAttribute(new Synthetic(cp.addUtf8("Synthetic"), 0, null, cp
                .getConstantPool()));

        //
        // construct method body
        //
View Full Code Here

Examples of org.apache.bcel.classfile.Synthetic

        MethodGen mg = new MethodGen(
                Constants.ACC_FINAL | Constants.ACC_PUBLIC, methodReturnType,
                methodArgTypes, null, // arg names
                method.getName(), clazz.getClassName(), il, cp);

        mg.addAttribute(new Synthetic(cp.addUtf8("Synthetic"), 0, null, cp
                .getConstantPool()));

        Class[] throwsException = method.getExceptionTypes();
        for (int i = 0; i < throwsException.length; i++) {
            mg.addException(throwsException[i].getName());
View Full Code Here

Examples of org.apache.bcel.classfile.Synthetic

        MethodGen mg = new MethodGen(
                Constants.ACC_FINAL | Constants.ACC_PUBLIC, methodReturnType,
                methodArgTypes, null, // arg names
                method.getName(), clazz.getClassName(), il, cp);

        mg.addAttribute(new Synthetic(cp.addUtf8("Synthetic"), 0, null, cp
                .getConstantPool()));

        Class[] throwsException = method.getExceptionTypes();
        for (int i = 0; i < throwsException.length; i++) {
            mg.addException(throwsException[i].getName());
View Full Code Here

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

      }
      // belt and braces, do the attribute even on Java 5 in addition to
      // the modifier flag
      ConstantPool cpg = gen.getConstantPool();
      int index = cpg.addUtf8("Synthetic");
      gen.addAttribute(new Synthetic(index, 0, new byte[0], cpg));
    }

    if (hasBody()) {
      if (this.enclosingClass.getWorld().shouldFastPackMethods()) {
        if (isAdviceMethod() || getName().equals("<clinit>")) {
View Full Code Here

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

        // Attribute[] oldAttrs = field.getAttributes();
        // Attribute[] newAttrs = new Attribute[oldAttrs.length + 1];
        // System.arraycopy(oldAttrs, 0, newAttrs, 0, oldAttrs.length);
        ConstantPool cpg = myGen.getConstantPool();
        int index = cpg.addUtf8("Synthetic");
        Attribute synthetic = new Synthetic(index, 0, new byte[0], cpg);
        field.addAttribute(synthetic);
        // newAttrs[newAttrs.length - 1] = synthetic;
        // field.setAttributes(newAttrs);
      }
    }
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.