Package com.sun.org.apache.bcel.internal.generic

Examples of com.sun.org.apache.bcel.internal.generic.ConstantPoolGen.addFieldref()


            // Store variable in new closure
            il.append(DUP);
            il.append(var.loadInstruction());
            il.append(new PUTFIELD(
                    cpg.addFieldref(_className, var.getEscapedName(),
                        varType.toSignature())));
        }
    }

    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
View Full Code Here


    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();
        final int ac = argumentCount();

        final int domField = cpg.addFieldref(classGen.getClassName(),
                                             DOM_FIELD,
                                             DOM_INTF_SIG);

        String docParamList = null;
        if (ac == 1) {
View Full Code Here

                                         Util.getJCRefType(DOM_INTF_SIG),
                                         null, null);
        final String className = classGen.getClassName();
        il.append(filterGen.loadTranslet());
        il.append(new CHECKCAST(cpg.addClass(className)));
        il.append(new GETFIELD(cpg.addFieldref(className,
                                               DOM_FIELD, DOM_INTF_SIG)));
        local.setStart(il.append(new ASTORE(local.getIndex())));

        // Store the dom index in the test generator
        testGen.setDomIndex(local.getIndex());
View Full Code Here

            // Use getfield if in an inner class
            if (variableClosure != null) {
                il.append(ALOAD_0);
                il.append(new GETFIELD(
                    cpg.addFieldref(variableClosure.getInnerClassName(),
                        var.getEscapedName(), varType.toSignature())));
            }
            else {
                // Use a load of instruction if in translet class
                il.append(var.loadInstruction());
View Full Code Here

                il.append(var.loadInstruction());
            }

            // Store variable in new closure
            il.append(new PUTFIELD(
                    cpg.addFieldref(_className, var.getEscapedName(),
                        varType.toSignature())));
        }
    }

    /**
 
View Full Code Here

        int field = 0;
        il.append(classGen.loadTranslet());

        // Only update _version field if set and different from default
        if ((_version != null) && (!_version.equals(XML_VERSION))) {
            field = cpg.addFieldref(TRANSLET_CLASS, "_version", STRING_SIG);
            il.append(DUP);
            il.append(new PUSH(cpg, _version));
            il.append(new PUTFIELD(field));
        }
View Full Code Here

            il.append(new PUTFIELD(field));
        }

        // Only update _method field if "method" attribute used
        if (_method != null) {
            field = cpg.addFieldref(TRANSLET_CLASS, "_method", STRING_SIG);
            il.append(DUP);
            il.append(new PUSH(cpg, _method));
            il.append(new PUTFIELD(field));
        }
View Full Code Here

            il.append(new PUTFIELD(field));
        }

        // Only update if _encoding field is "encoding" attribute used
        if (_encoding != null) {
            field = cpg.addFieldref(TRANSLET_CLASS, "_encoding", STRING_SIG);
            il.append(DUP);
            il.append(new PUSH(cpg, _encoding));
            il.append(new PUTFIELD(field));
        }
View Full Code Here

            il.append(new PUTFIELD(field));
        }

        // Only update if "omit-xml-declaration" used and set to 'yes'
        if (_omitHeader) {
            field = cpg.addFieldref(TRANSLET_CLASS, "_omitHeader", "Z");
            il.append(DUP);
            il.append(new PUSH(cpg, _omitHeader));
            il.append(new PUTFIELD(field));
        }
View Full Code Here

            il.append(new PUTFIELD(field));
        }

        // Add 'standalone' decaration to output - use text as is
        if (_standalone != null) {
            field = cpg.addFieldref(TRANSLET_CLASS, "_standalone", STRING_SIG);
            il.append(DUP);
            il.append(new PUSH(cpg, _standalone));
            il.append(new PUTFIELD(field));
        }
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.