Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.CHECKCAST


  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


          null, null);
  field = cpg.addFieldref(NODE_COUNTER, "_translet",
        "Lorg/apache/xalan/xsltc/Translet;");
  il.append(ALOAD_0); // 'this' pointer on stack
  il.append(new GETFIELD(field));
  il.append(new CHECKCAST(cpg.addClass(TRANSLET_CLASS)));
  il.append(new ASTORE(local.getIndex()));
  nodeCounterGen.setTransletIndex(local.getIndex());

  // Get NodeCounter._document and store locally
  local = matchGen.addLocalVariable("document",
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

  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

   
    il.append(methodGen.loadCurrentNode());
    il.append(classGen.loadTranslet());
    if (classGen.isExternal()) {
        final String className = classGen.getClassName();
        il.append(new CHECKCAST(cpg.addClass(className)));
    }
    il.append(new INVOKESPECIAL(idx));
      }
  }
    }
View Full Code Here

  @SuppressWarnings("unused")
  // Called using reflection
  private Instruction createInstructionCheckcast(Element inst) throws IllegalXMLVMException
  {
    String classType= inst.getAttributeValue("type");
    return new CHECKCAST(constantPoolGen.addClass(classType));
  }
View Full Code Here

/* 525 */     int booleanValueIndex = cp.addMethodref(Boolean.class.getName(), "booleanValue", "()Z");
/*     */
/* 531 */     if (type.equals(Integer.TYPE.getName()))
/*     */     {
/* 533 */       int x = cp.addClass("java.lang.Integer");
/* 534 */       il.append(new CHECKCAST(x));
/* 535 */       il.append(new INVOKEVIRTUAL(intValueIndex));
/*     */     }
/* 538 */     else if (type.equals(Byte.TYPE.getName()))
/*     */     {
/* 540 */       int x = cp.addClass("java.lang.Byte");
/* 541 */       il.append(new CHECKCAST(x));
/* 542 */       il.append(new INVOKEVIRTUAL(byteValueIndex));
/*     */     }
/* 545 */     else if (type.equals(Character.TYPE.getName()))
/*     */     {
/* 547 */       int x = cp.addClass("java.lang.Character");
/* 548 */       il.append(new CHECKCAST(x));
/* 549 */       il.append(new INVOKEVIRTUAL(charValueIndex));
/*     */     }
/* 552 */     else if (type.equals(Double.TYPE.getName()))
/*     */     {
/* 554 */       int x = cp.addClass("java.lang.Double");
/* 555 */       il.append(new CHECKCAST(x));
/* 556 */       il.append(new INVOKEVIRTUAL(doubleValueIndex));
/*     */     }
/* 559 */     else if (type.equals(Float.TYPE.getName()))
/*     */     {
/* 561 */       int x = cp.addClass("java.lang.Float");
/* 562 */       il.append(new CHECKCAST(x));
/* 563 */       il.append(new INVOKEVIRTUAL(floatValueIndex));
/*     */     }
/* 566 */     else if (type.equals(Long.TYPE.getName()))
/*     */     {
/* 568 */       int x = cp.addClass("java.lang.Long");
/* 569 */       il.append(new CHECKCAST(x));
/* 570 */       il.append(new INVOKEVIRTUAL(longValueIndex));
/*     */     }
/* 573 */     else if (type.equals(Short.TYPE.getName()))
/*     */     {
/* 575 */       int x = cp.addClass("java.lang.Short");
/* 576 */       il.append(new CHECKCAST(x));
/* 577 */       il.append(new INVOKEVIRTUAL(shortValueIndex));
/*     */     }
/* 580 */     else if (type.equals(Boolean.TYPE.getName()))
/*     */     {
/* 582 */       int x = cp.addClass("java.lang.Boolean");
/* 583 */       il.append(new CHECKCAST(x));
/* 584 */       il.append(new INVOKEVIRTUAL(booleanValueIndex));
/*     */     }
/*     */
/* 587 */     return il;
/*     */   }
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.