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

Examples of com.sun.org.apache.bcel.internal.generic.GETFIELD


                 "topLevel",
                 topLevelSig);
      // Push all parameters on the stack and call topLevel()
      il.append(classGen.loadTranslet()); // The 'this' pointer
      il.append(classGen.loadTranslet());
      il.append(new GETFIELD(domField))// The DOM reference
      il.append(transf.loadIterator());
      il.append(transf.loadHandler());    // The output handler
      il.append(new INVOKEVIRTUAL(topLevelIdx));
 

  // start document
  il.append(transf.loadHandler());
  il.append(transf.startDocument());

  // push first arg for applyTemplates
  il.append(classGen.loadTranslet());
  // push translet for GETFIELD to get DOM arg
  il.append(classGen.loadTranslet());
  il.append(new GETFIELD(domField));
  // push remaining 2 args
  il.append(transf.loadIterator());
  il.append(transf.loadHandler());
  il.append(new INVOKEVIRTUAL(applyTemplates));
  // endDocument
View Full Code Here


        variableClosure = variableClosure.getParentClosure();
    }
     
    if (variableClosure != null) {
        il.append(ALOAD_0);
        il.append(new GETFIELD(
      cpg.addFieldref(variableClosure.getInnerClassName(),
          name, signature)));
    }
    else {
        il.append(_variable.loadInstruction());
        _variable.removeReference(this);
    }
      }
      else {
    il.append(_variable.loadInstruction());
    _variable.removeReference(this);
      }
  }
  else {
      final String className = classGen.getClassName();
      il.append(classGen.loadTranslet());
      if (classGen.isExternal()) {
    il.append(new CHECKCAST(cpg.addClass(className)));
      }
      il.append(new GETFIELD(cpg.addFieldref(className,name,signature)));
  }

  if (_variable.getType() instanceof NodeSetType) {
      // The method cloneIterator() also does resetting
      final int clone = cpg.addInterfaceMethodref(NODE_ITERATOR,
View Full Code Here

  if ((elementCount() == 1) && (elementAt(0) instanceof Text)) {
      il.append(new PUSH(cpg, ((Text)elementAt(0)).getText()));
  }
  else {
      il.append(classGen.loadTranslet());
      il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
               "stringValueHandler",
               STRING_VALUE_HANDLER_SIG)));
      il.append(DUP);
      il.append(methodGen.storeHandler());
      // translate contents with substituted handler
View Full Code Here

      il.append(classGen.loadTranslet());
      if (classGen.isExternal()) {
    il.append(new CHECKCAST(cpg.addClass(className)));
      }
      il.append(DUP);
      il.append(new GETFIELD(cpg.addFieldref(className, "_dom",
               DOM_INTF_SIG)));

      // Create a new instance of a StringValueHandler
      int index = cpg.addMethodref(STRING_VALUE_HANDLER, "<init>", "()V");
      il.append(new NEW(cpg.addClass(STRING_VALUE_HANDLER)));
View Full Code Here

  // DOM adapters containing a result tree are not initialised with
  // translet-type to DOM-type mapping. This must be done now for
  // XPath expressions and patterns to work for the iterator we create.
  il.append(classGen.loadTranslet()); // get names array
  il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
                 NAMES_INDEX,
                 NAMES_INDEX_SIG)));
  il.append(classGen.loadTranslet()); // get uris array
  il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
                 URIS_INDEX,
                 URIS_INDEX_SIG)));
  il.append(classGen.loadTranslet()); // get types array
  il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
                 TYPES_INDEX,
                 TYPES_INDEX_SIG)));
  il.append(classGen.loadTranslet()); // get namespaces array
  il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
                 NAMESPACE_INDEX,
                 NAMESPACE_INDEX_SIG)));
  // Pass the type mappings to the DOM adapter
  final int mapping = cpg.addInterfaceMethodref(DOM_INTF,
                  "setupMapping",
View Full Code Here

                                // method to copy the value from a field in
                                // CopyLocals to the new local in the outlined
                                // method
                                newMethCopyInIL.append(
                                        InstructionConstants.ALOAD_1);
                                newMethCopyInIL.append(new GETFIELD(fieldRef));
                                newMethCopyInIL.append(
                                        storeLocal(newLocalVarIndex, varType));
                            }

                            if (copyOutLocalValue) {
                                // Generate code for the end of the outlined
                                // method to copy the value from the new local
                                // variable into a field in CopyLocals
                                // method
                                newMethCopyOutIL.append(
                                        InstructionConstants.ALOAD_1);
                                newMethCopyOutIL.append(
                                        loadLocal(newLocalVarIndex, varType));
                                newMethCopyOutIL.append(new PUTFIELD(fieldRef));

                                // Generate code to copy the value from a field
                                // in CopyLocals into a local in the original
                                // method following invocation of the outlined
                                // method.
                                oldMethCopyOutIL.append(
                                        InstructionConstants.DUP);
                                oldMethCopyOutIL.append(new GETFIELD(fieldRef));
                                InstructionHandle copyOutStore =
                                    oldMethCopyOutIL.append(
                                        storeLocal(oldLocalVarIndex, varType));

                                // If the start of the live range of the old
View Full Code Here

            _name.translate(classGen, methodGen);// 2nd arg

        }

        il.append(classGen.loadTranslet());
        il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
                                               "stringValueHandler",
                                               STRING_VALUE_HANDLER_SIG)));
        il.append(DUP);
        il.append(methodGen.storeHandler());
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
View Full Code Here

            il.append(classGen.loadTranslet());
            if (classGen.isExternal()) {
                il.append(new CHECKCAST(cpg.addClass(className)));
            }
            il.append(DUP);
            il.append(new GETFIELD(cpg.addFieldref(className, "_dom",
                                                   DOM_INTF_SIG)));

            // Create a new instance of a StringValueHandler
            int index = cpg.addMethodref(STRING_VALUE_HANDLER, "<init>", "()V");
            il.append(new NEW(cpg.addClass(STRING_VALUE_HANDLER)));
View Full Code Here

TOP

Related Classes of com.sun.org.apache.bcel.internal.generic.GETFIELD

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.