Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.CHECKCAST


                String type = null;
                if (field.getType() instanceof ArrayType)
                    type = field.getType().getSignature();
                else
                    type = field.getType().toString();
                il.append(new CHECKCAST(constantPoolGen.addClass(type)));
            }
            if (!targetFields[i].isProperty())
            {
                //field = jdoStateManager.replacingXXXField(this, fieldIndex);
                il.append(factory.createPutField(className, field.getName(), field.getType()));
View Full Code Here


            String type = null;
            if (nativeType instanceof ArrayType)
                type = nativeType.getSignature();
            else
                type = nativeType.toString();
            il.append(new CHECKCAST(constantPoolGen.addClass(type)));
        }
        il.append(InstructionFactory.createReturn(nativeType));

        // ----detach------
        if (cmd.isDetachable())
View Full Code Here

  }
  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) {
View Full Code Here

  il.append(ILOAD_1);
  il.append(ILOAD_2);
  il.append(new INVOKESPECIAL(cpg.addMethodref(NODE_SORT_FACTORY,
      "makeNodeSortRecord", "(II)" + NODE_SORT_RECORD_SIG)));
  il.append(DUP);
  il.append(new CHECKCAST(cpg.addClass(sortRecordClass)));

  // Initialize closure in record class
  final int ndups = dups.size();
  for (int i = 0; i < ndups; i++) {
      final VariableRefBase varRef = (VariableRefBase) dups.get(i);
View Full Code Here

     */
    public void translateUnBox(ClassGenerator classGen,
             MethodGenerator methodGen) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS)));
  il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS,
                 NODE_FIELD,
                 NODE_FIELD_SIG)));
    }
View Full Code Here

     */
    public void translateUnBox(ClassGenerator classGen,
             MethodGenerator methodGen) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  il.append(new CHECKCAST(cpg.addClass(INTEGER_CLASS)));
  final int index = cpg.addMethodref(INTEGER_CLASS,
             INT_VALUE,
             INT_VALUE_SIG);
  il.append(new INVOKEVIRTUAL(index));
    }
View Full Code Here

     */
    public void translateUnBox(ClassGenerator classGen,
             MethodGenerator methodGen) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  il.append(new CHECKCAST(cpg.addClass(BOOLEAN_CLASS)));
  il.append(new INVOKEVIRTUAL(cpg.addMethodref(BOOLEAN_CLASS,
                 BOOLEAN_VALUE,
                 BOOLEAN_VALUE_SIG)));
    }
View Full Code Here

  local = testGen.addLocalVariable("document",
           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)));
  il.append(new ASTORE(local.getIndex()));

  // Store the dom index in the test generator
View Full Code Here

  if (_nthPositionFilter || _nthDescendant) {
      _exp.translate(classGen, methodGen);
  }
  else if (isNodeValueTest() && (getParent() instanceof Step)) {
      _value.translate(classGen, methodGen);
      il.append(new CHECKCAST(cpg.addClass(STRING_CLASS)));
      il.append(new PUSH(cpg, ((EqualityExpr)_exp).getOp()));
  }
  else {
      translateFilter(classGen, methodGen);
  }
View Full Code Here

      final int current = methodGen.getLocalIndex("current");
     
      // Push required parameters
      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)));
View Full Code Here

TOP

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

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.