Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.IFNONNULL


     * @param src object responsible for generating branch
     * @return wrapper for appended conditional branch
     */
    public BranchWrapper appendIFNONNULL(Object src) {
        verifyStackObject();
        BranchHandle hand = m_instructionList.append(new IFNONNULL(null));
        setTarget(hand);
        m_stackState.pop();
        return new BranchWrapper(hand, m_stackState.toArray(), src);
    }
View Full Code Here


  final InstructionList il = methodGen.getInstructionList();

  if (clazz.getName().equals("java.lang.String")) {
      // same internal representation, convert null to ""
      il.append(DUP);
      final BranchHandle ifNonNull = il.append(new IFNONNULL(null));
      il.append(POP);
      il.append(new PUSH(cpg, ""));
      ifNonNull.setTarget(il.append(NOP));
  }
  else {
View Full Code Here

              * param using its default value:
              *       if (param == null) param = <default-value>
              */
            if (_isInSimpleNamedTemplate) {
    il.append(loadInstruction());
                BranchHandle ifBlock = il.append(new IFNONNULL(null));
                translateValue(classGen, methodGen);
                il.append(storeInstruction());
                ifBlock.setTarget(il.append(NOP));
                return;
            }
View Full Code Here

  final InstructionList il = methodGen.getInstructionList();

  if (clazz.getName().equals("java.lang.String")) {
      // same internal representation, convert null to ""
      il.append(DUP);
      final BranchHandle ifNonNull = il.append(new IFNONNULL(null));
      il.append(POP);
      il.append(new PUSH(cpg, ""));
      ifNonNull.setTarget(il.append(NOP));
  }
  else {
View Full Code Here

      il.append(classGen.loadTranslet());
      il.append(new GETFIELD(iteratorIndex));
      il.append(DUP);
      iter.setStart(il.append(new ASTORE(iter.getIndex())));
      ifBlock = il.append(new IFNONNULL(null));
      il.append(classGen.loadTranslet());
 

  // Compile the step created at type checking time
  _step.translate(classGen, methodGen);
View Full Code Here

  }

  // Check if field is initialized (runtime)
  il.append(classGen.loadTranslet());
  il.append(new GETFIELD(fieldIndexes[_level]));
  final BranchHandle ifBlock1 = il.append(new IFNONNULL(null));

  // Create an instance of DefaultNodeCounter
  index = cpg.addMethodref(ClassNames[_level],
         "getDefaultNodeCounter",
         "(" + TRANSLET_INTF_SIG
View Full Code Here

      il.append(classGen.loadTranslet());
      il.append(new GETFIELD(iteratorIndex));
      il.append(DUP);
      il.append(new ASTORE(iter.getIndex()));
      ifBlock = il.append(new IFNONNULL(null));
      il.append(classGen.loadTranslet());
 

  // Compile the step created at type checking time
  _step.translate(classGen, methodGen);
View Full Code Here

  final InstructionList il = methodGen.getInstructionList();

  if (clazz.getName().equals("java.lang.String")) {
      // same internal representation, convert null to ""
      il.append(DUP);
      final BranchHandle ifNonNull = il.append(new IFNONNULL(null));
      il.append(POP);
      il.append(new PUSH(cpg, ""));
      ifNonNull.setTarget(il.append(NOP));
  }
  else {
View Full Code Here

              * param using its default value:
              *       if (param == null) param = <default-value>
              */
            if (_isInSimpleNamedTemplate) {
    il.append(loadInstruction());
                BranchHandle ifBlock = il.append(new IFNONNULL(null));
                translateValue(classGen, methodGen);
                il.append(storeInstruction());
                ifBlock.setTarget(il.append(NOP));
                return;
            }
View Full Code Here

      il.append(classGen.loadTranslet());
      il.append(new GETFIELD(iteratorIndex));
      il.append(DUP);
      il.append(new ASTORE(iter.getIndex()));
      ifBlock = il.append(new IFNONNULL(null));
      il.append(classGen.loadTranslet());
 

  // Compile the step created at type checking time
  _step.translate(classGen, methodGen);
View Full Code Here

TOP

Related Classes of org.apache.bcel.generic.IFNONNULL

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.