Package org.objectweb.asm.commons

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


      adapter.storeLocal(old);
     
          // PageException pe=Caster.toPageEception(e);
          int pe=adapter.newLocal(Types.PAGE_EXCEPTION);
          adapter.loadLocal(e);
          adapter.invokeStatic(Types.CASTER, TO_PAGE_EXCEPTION);
      adapter.storeLocal(pe);
     
      Iterator<Tag> it = catches.iterator();
      Attribute attrType;
      Expression type;
View Full Code Here


     */
    public Type _writeOut(BytecodeContext bc, int mode) {
      GeneratorAdapter adapter = bc.getAdapter();
        adapter.push(i);
        if(mode==MODE_REF) {
            adapter.invokeStatic(Types.CASTER,Methods.METHOD_TO_INTEGER_FROM_INT);
            return Types.INTEGER;
        }
        return Types.INT_VALUE;
    }

View Full Code Here

     */
    public Type _writeOut(BytecodeContext bc, int mode) {
      GeneratorAdapter adapter = bc.getAdapter();
        adapter.push(f);
        if(mode==MODE_REF) {
            adapter.invokeStatic(Types.CASTER,Methods.METHOD_TO_FLOAT_FROM_FLOAT);
            return Types.FLOAT;
        }
        return Types.FLOAT_VALUE;
    }

View Full Code Here

    Attribute attrIndex = getAttribute("index");
    if(attrIndex!=null){
      index = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrIndex.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(index);
    }

    //VariableReference item=VariableInterpreter.getVariableReference(pc,item);
    int item = -1;
View Full Code Here

    Attribute attrItem = getAttribute("item");
    if(attrItem!=null){
      item = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrItem.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(item);
    }
    boolean hasIndexAndItem=index!=-1 && item!=-1;
   
   
View Full Code Here

    // item and index
    int entry=-1;
    if(hasIndexAndItem) {
      entry = adapter.newLocal(Types.MAP_ENTRY);
      // Caster.toCollection(collection)
      adapter.invokeStatic(Types.CASTER,Methods_Caster.TO_COLLECTION);
      //coll.entryIterator();
      adapter.invokeInterface(Types.COLLECTION, ENTRY_ITERATOR);
    }
    else {
      adapter.invokeStatic(Types.CASTER,ForEach.TO_ITERATOR);
View Full Code Here

      adapter.invokeStatic(Types.CASTER,Methods_Caster.TO_COLLECTION);
      //coll.entryIterator();
      adapter.invokeInterface(Types.COLLECTION, ENTRY_ITERATOR);
    }
    else {
      adapter.invokeStatic(Types.CASTER,ForEach.TO_ITERATOR);
    }
   
   
    adapter.storeLocal(it);
   
View Full Code Here

        // keyRef.set(pc,entry.getKey())
        adapter.loadLocal(index);
        adapter.loadArg(0);
        adapter.loadLocal(entry);
        adapter.invokeInterface(Types.MAP_ENTRY, GET_KEY);
        adapter.invokeStatic(Types.CASTER,Methods.METHOD_TO_STRING);
        adapter.invokeVirtual(Types.VARIABLE_REFERENCE, SET);
        adapter.pop();

        // valueRef.set(pc,entry.getKey())
        adapter.loadLocal(item);
View Full Code Here

    Attribute attrItem = getAttribute("item");
    if(attrItem!=null) {
      item = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrItem.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(item);
    }

    // index
    Attribute attrIndex = getAttribute("index");
View Full Code Here

    Attribute attrIndex = getAttribute("index");
    if(attrIndex!=null) {
      index = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrIndex.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(index);
    }
   
    //java.io.File file=FileUtil.toResourceExisting(pc,@file);
    int resource=adapter.newLocal(Types.RESOURCE);
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.