Examples of BytecodeException


Examples of net.sourceforge.javautil.bytecode.BytecodeException

  /**
   * @param type The type to add to this pool
   */
  public void add (AbstractType type) {
    if (resolved.containsKey(type.getName())) {
      throw new BytecodeException("This pool already has a class by the name of: " + type.getName());
    }
   
    this.resolved.put(type.getName(), type);
  }
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.BytecodeException

        else if ("char".equals(className)) clazz = char.class;
        else clazz = Class.forName(className, false, parentLoader);
       
        this.resolved.put(className, resolved = new Linkable(clazz));
      } catch (ClassNotFoundException e) {
        throw new BytecodeException("Could not resolve class: " + className, e);
      }
    }
    return resolved;
  }
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.BytecodeException

    public IBytecodeField getField(BytecodeResolutionPool pool, String name) {
      try {
        Field field = clazz.getDeclaredField(name);
        return new BytecodeFieldDeclared(pool, this, field);
      } catch (SecurityException e) {
        throw new BytecodeException("Could not access field: " + name, e);
      } catch (NoSuchFieldException e) {
        if (this.superType != null) {
          return this.getSuperType().getField(pool, name);
        } else {
          throw new RuntimeException(e);
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.BytecodeException

      case Version1_5: return V1_5;
      case Version6: return V1_6;
      case Version7: return V1_7;
    }
   
    throw new BytecodeException("Version of bytecode/class file not supported: " + version);
  }
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

      fc=ASMUtil.getAncestorRetryFCStatement(stat,finallyLabels,label);
      name="retry";
    }
   
    if(fc==null)
      throw new BytecodeException(name+" must be inside a loop (for,while,do-while,<cfloop>,<cfwhile> ...)",stat.getStart());
   
    GeneratorAdapter adapter = bc.getAdapter();
   
    Label end;
    if(FlowControl.BREAK==flowType) end=((FlowControlBreak)fc).getBreakLabel();
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

  public static Page getAncestorPage(Statement stat) throws BytecodeException {
    Statement parent=stat;
    while(true)  {
      parent=parent.getParent();
      if(parent==null) {
        throw new BytecodeException("missing parent Statement of Statement",stat.getStart());
        //return null;
      }
      if(parent instanceof Pagereturn (Page) parent;
    }
  }
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

    Statement parent=stat;
    while(true)  {
      parent=parent.getParent();
      //print.ln(" - "+parent);
      if(parent==null) {
        throw new BytecodeException("missing parent Statement of Statement",stat.getStart());
        //return null;
      }
      if(parent instanceof TagComponent)
      //if(parent instanceof Tag && "component".equals(((Tag)parent).getTagLibTag().getName())) 
        return (Tag) parent;
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

  }


  public static Boolean toBoolean(Attribute attr, Position start) throws BytecodeException {
    if(attr==null)
      throw new BytecodeException("attribute does not exist",start);
   
    if(attr.getValue() instanceof Literal){
      Boolean b=((Literal)attr.getValue()).getBoolean(null);
      if(b!=null) return b;
    }
    throw new BytecodeException("attribute ["+attr.getName()+"] must be a constant boolean value",start);
   
   
  }
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

        local =bc.getAdapter().newLocal(t);
        db.locals.put(name, Integer.valueOf(local));
     
    }
    else
      throw new BytecodeException("there is already a variable declared with name ["+name+"]", getLine());
   
   
    //bc.getAdapter().visitLocalVariable(name, strType, null, db.start,db.end,x);
   
    if(value!=null){
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

  public Type _writeOut(BytecodeContext bc, int mode) throws BytecodeException {
   
    Integer var=db.locals.get(operant);
    if(var==null)
      throw new BytecodeException("there is no variable with name ["+operation+"] in the enviroment", getLine());
   
    GeneratorAdapter a = bc.getAdapter();
   
    if(operation.startsWith("pos")) a.loadLocal(var.intValue());
    if("preDecrement".equals(operation))a.iinc(var.intValue(), -1);
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.