Package net.sourceforge.javautil.bytecode

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


        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

    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

      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

TOP

Related Classes of net.sourceforge.javautil.bytecode.BytecodeException

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.