Package org.objectweb.asm.commons

Examples of org.objectweb.asm.commons.GeneratorAdapter.invokeStatic()


   
    //java.io.File file=FileUtil.toResourceExisting(pc,@file);
    int resource=adapter.newLocal(Types.RESOURCE);
    adapter.loadArg(0);
    getAttribute("file").getValue().writeOut(bc, Expression.MODE_REF);
    adapter.invokeStatic(RESOURCE_UTIL, TO_RESOURCE_EXISTING);
    adapter.storeLocal(resource);
   
    // pc.getConfig().getSecurityManager().checkFileLocation(resource);
    adapter.loadArg(0);
    adapter.invokeVirtual(Types.PAGE_CONTEXT, GET_CONFIG);
View Full Code Here


   
    // BufferedReader reader = IOUtil.getBufferedReader(resource,charset);
    final int br=adapter.newLocal(Types.BUFFERED_READER);
    adapter.loadLocal(resource);
    adapter.loadLocal(charset);
    adapter.invokeStatic(IO_UTIL, GET_BUFFERED_READER);
    adapter.storeLocal(br);
   
    // String line;
    int line=adapter.newLocal(Types.STRING);
   
View Full Code Here

          if(attr!=null) {
            // IOUtil.read(bufferedreader,12)
            adapter.loadLocal(br);
            adapter.loadLocal(carr);
            adapter.arrayLength();
            adapter.invokeStatic(Types.IOUTIL, READ);
          }
          else {
            // br.readLine()
            adapter.loadLocal(br);
            adapter.invokeVirtual(Types.BUFFERED_READER, READ_LINE);
View Full Code Here

          // index.set(pc,line);
          adapter.loadLocal(index);
          adapter.loadArg(0);
          adapter.loadLocal(count);
          adapter.cast(Types.INT_VALUE,Types.DOUBLE_VALUE);
          adapter.invokeStatic(Types.CASTER, Methods.METHOD_TO_DOUBLE_FROM_DOUBLE);
         
          adapter.invokeVirtual(Types.VARIABLE_REFERENCE, SET);
          adapter.pop();
         
          // item.set(pc,line);
View Full Code Here

        // NumberRange.range(@startrow,1)
        //attrStartRow.getValue().writeOut(bc, Expression.MODE_VALUE);
        CastInt.toExprInt(attrStartRow.getValue()).writeOut(bc, Expression.MODE_VALUE);
        //adapter.visitInsn(Opcodes.D2I);
        adapter.push(1);
        adapter.invokeStatic(Types.NUMBER_RANGE, RANGE);
        //adapter.visitInsn(Opcodes.D2I);
      }
      else {
        adapter.push(1);
      }
View Full Code Here

     
      Attribute attrMaxRow = tag.getAttribute("maxrows");
      Attribute attrEndRow = tag.getAttribute("endrow");
      if(attrMaxRow!=null) {
        CastInt.toExprInt(attrMaxRow.getValue()).writeOut(bc, Expression.MODE_VALUE);
        adapter.invokeStatic(NUMBER_ITERATOR, LOAD_MAX);
      }
      else if(attrEndRow!=null) {
        CastInt.toExprInt(attrEndRow.getValue()).writeOut(bc, Expression.MODE_VALUE);
        adapter.invokeStatic(NUMBER_ITERATOR, LOAD_END);
      }
View Full Code Here

        CastInt.toExprInt(attrMaxRow.getValue()).writeOut(bc, Expression.MODE_VALUE);
        adapter.invokeStatic(NUMBER_ITERATOR, LOAD_MAX);
      }
      else if(attrEndRow!=null) {
        CastInt.toExprInt(attrEndRow.getValue()).writeOut(bc, Expression.MODE_VALUE);
        adapter.invokeStatic(NUMBER_ITERATOR, LOAD_END);
      }
      else {
        adapter.invokeStatic(NUMBER_ITERATOR, LOAD_2);
      }
      adapter.storeLocal(tag.getNumberIterator());
View Full Code Here

      else if(attrEndRow!=null) {
        CastInt.toExprInt(attrEndRow.getValue()).writeOut(bc, Expression.MODE_VALUE);
        adapter.invokeStatic(NUMBER_ITERATOR, LOAD_END);
      }
      else {
        adapter.invokeStatic(NUMBER_ITERATOR, LOAD_2);
      }
      adapter.storeLocal(tag.getNumberIterator());
     
      // Group
      Attribute attrGroup = tag.getAttribute("group");
View Full Code Here

          adapter.invokeVirtual(Types.PAGE_CONTEXT, US);
          adapter.invokeInterface(UNDEFINED, REMOVE_QUERY);
         
            // NumberIterator.release(ni);
          adapter.loadLocal(tag.getNumberIterator());
          adapter.invokeStatic(NUMBER_ITERATOR, REALEASE);
        }
      },null);
      tfv.visitTryBegin(bc);
        WhileVisitor wv = new WhileVisitor();
        if(tag instanceof TagLoop) ((TagLoop)tag).setLoopVisitor(wv);
View Full Code Here

            adapter.loadArg(0);
            adapter.loadLocal(tag.getNumberIterator());
            adapter.loadLocal(tag.getQuery());
            adapter.loadLocal(tag.getGroup());
            adapter.loadLocal(groupCaseSensitive);
            adapter.invokeStatic(NUMBER_ITERATOR, LOAD_5);
            adapter.storeLocal(tag.getNumberIterator());
           
            // current=oldNi.current();
            adapter.loadLocal(oldNi);
            adapter.invokeVirtual(NUMBER_ITERATOR, CURRENT);
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.