Examples of ICONST


Examples of org.apache.bcel.generic.ICONST

      }
      // Push the default value on the JVM's stack
      if ((_type instanceof IntType) ||
    (_type instanceof NodeType) ||
    (_type instanceof BooleanType))
    il.append(new ICONST(0)); // 0 for node-id, integer and boolean
      else if (_type instanceof RealType)
    il.append(new DCONST(0)); // 0.0 for floating point numbers
      else
    il.append(new ACONST_NULL()); // and 'null' for anything else
      il.append(_type.STORE(_local.getIndex()));

Examples of org.apache.bcel.generic.ICONST

    il.append(methodGen.loadDOM());
    // If the predicate's Step is simply '.' we translate this Step
    // and place the node test on top of the resulting iterator
    if (step.isAbbreviatedDot()) {
        translate(classGen, methodGen);
        il.append(new ICONST(DOM.RETURN_CURRENT));
    }
    // Otherwise we create a parent location path with this Step and
    // the predicates Step, and place the node test on top of that
    else {
        ParentLocationPath path = new ParentLocationPath(this,step);
        try {
      path.typeCheck(getParser().getSymbolTable());
        }
        catch (TypeCheckError e) { }
        path.translate(classGen, methodGen);
        il.append(new ICONST(DOM.RETURN_PARENT));
    }
    predicate.translate(classGen, methodGen);
    idx = cpg.addInterfaceMethodref(DOM_INTF,
            GET_NODE_VALUE_ITERATOR,
            GET_NODE_VALUE_ITERATOR_SIG);
    il.append(new INVOKEINTERFACE(idx, 5));
      }           
      // Handle '//*[n]' expression
      else if (predicate.isNthDescendant()) {
    il.append(methodGen.loadDOM());
    // il.append(new ICONST(NodeTest.ELEMENT));
    il.append(new ICONST(predicate.getPosType()));
    predicate.translate(classGen, methodGen);
    il.append(new ICONST(0));
    idx = cpg.addInterfaceMethodref(DOM_INTF,
            "getNthDescendant",
            "(IIZ)"+NODE_ITERATOR_SIG);
    il.append(new INVOKEINTERFACE(idx, 4));
      }

Examples of org.apache.bcel.generic.ICONST

  @SuppressWarnings("unused")
  // Called using reflection
  private Instruction createInstructionIconst(Element inst)
  {
    int value= Integer.parseInt(inst.getAttributeValue("value"));
    return new ICONST(value);
  }
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.