Examples of IFNONNULL


Examples of org.apache.bcel.generic.IFNONNULL

  }

  // 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

Examples of org.apache.bcel.generic.IFNONNULL

      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

Examples of org.apache.bcel.generic.IFNONNULL

  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

Examples of org.apache.bcel.generic.IFNONNULL

              * 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

Examples of org.apache.bcel.generic.IFNONNULL

      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

Examples of org.apache.bcel.generic.IFNONNULL

                    if (check instanceof IF_ACMPNE || check instanceof IF_ACMPEQ) {
                        // need to update
                        head.swapInstruction(new NOP());
                        IfInstruction ifTest = (IfInstruction) check;
                        if (check instanceof IF_ACMPNE) {
                            next2.swapInstruction(new IFNONNULL(ifTest.getTarget()));
                        } else {
                            next2.swapInstruction(new IFNULL(ifTest.getTarget()));
                        }
                    }
                }
View Full Code Here

Examples of org.apache.bcel.generic.IFNONNULL

  }

  // 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

Examples of org.apache.bcel.generic.IFNONNULL

                oidType = BCELClassEnhancer.OT_ObjectIdentity;
                oidKeyType = new ObjectType(Object.class.getName());
            }

            il.append(InstructionConstants.ALOAD_1);
            BranchInstruction checkKeyIsNull = new IFNONNULL(null);
            il.append(checkKeyIsNull);
            createThrowException(ClassEnhancer.CN_IllegalArgumentException, "key is null");
            checkKeyIsNull.setTarget(il.append(InstructionConstants.ALOAD_1));
            il.append(factory.createInstanceOf(Type.STRING));
            il.append(InstructionConstants.ICONST_1);
            BranchInstruction isInstanceof = new IF_ICMPEQ(null);
            il.append(isInstanceof);
View Full Code Here

Examples of org.apache.bcel.generic.IFNONNULL

        String oidClassName = cmd.getObjectidClass();
        if ((oidClassName != null) && (oidClassName.length() > 0))
        {
            ObjectType oidType = new ObjectType(oidClassName);
            il.append(InstructionConstants.ALOAD_1);
            BranchInstruction checkFmNotNull = new IFNONNULL(null);
            il.append(checkFmNotNull);
            createThrowException(ClassEnhancer.CN_IllegalArgumentException, "ObjectIdFieldConsumer is null");
            checkFmNotNull.setTarget(il.append(InstructionConstants.ALOAD_2));
            il.append(factory.createInstanceOf(oidType));

            BranchInstruction isInstanceof = new IFNE(null);
            il.append(isInstanceof);
            createThrowException(ClassEnhancer.CN_ClassCastException, "oid is not instanceof " + oidClassName);
View Full Code Here

Examples of org.apache.bcel.generic.IFNONNULL

        {
            // if (jdoStateManager != null)
            il.append(InstructionConstants.ALOAD_0);
            il.append(factory.createGetField(className, ClassEnhancer.FN_StateManager, BCELClassEnhancer.OT_StateManager));

            IFNONNULL ifnonnullSM = new IFNONNULL(null);
            il.append(ifnonnullSM);

            // jdoDetachedState != null
            il.append(InstructionConstants.ALOAD_0);
            il.append(factory.createGetField(className, ClassEnhancer.FN_JdoDetachedState, BCELClassEnhancer.OT_ObjectArray));

            IFNONNULL ifnonnullObjectId = new IFNONNULL(null);
            il.append(ifnonnullObjectId);

            il.append(InstructionConstants.ICONST_0);
            il.append(InstructionConstants.IRETURN);

            ifnonnullObjectId.setTarget(il.append(InstructionConstants.ICONST_1));
            il.append(InstructionConstants.IRETURN);

            // target
            InstructionHandle ifnonnullTarget = il.append(InstructionConstants.ICONST_0);
            ifnonnullSM.setTarget(ifnonnullTarget);
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.