Package org.apache.bcel.classfile

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


        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

        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

        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

     * @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

        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

        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

        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

TOP

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

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.