Package org.apache.bcel.verifier.exc

Examples of org.apache.bcel.verifier.exc.AssertionViolatedException


        constraintViolated(o, "Referenced class '"+jc.getClassName()+"' is an interface, but not a class as expected.");
      }
         
        } catch (ClassNotFoundException e) {
      // FIXME: maybe not the best way to handle this
      throw new AssertionViolatedException("Missing class: " + e.toString());
        }
    }
View Full Code Here


// of "EmptyVisitor" and provide a thousand empty methods.
// However, in terms of performance this would be a better idea.
// If some new "Node" is defined in BCEL (such as some concrete "Attribute"), we
// want to know that this class has also to be adapted.
        if (tostring == null) {
            throw new AssertionViolatedException("Please adapt '" + getClass() + "' to deal with objects of class '" + n.getClass() + "'.");
        }
        return tostring;
    }
View Full Code Here

  public LocalVariablesInfo getLocalVariablesInfo(int method_nr){
    if (this.verify() != VerificationResult.VR_OK) {
            return null; // It's cached, don't worry.
        }
    if (method_nr < 0 || method_nr >= localVariablesInfos.length){
      throw new AssertionViolatedException("Method number out of range.");
    }
    return localVariablesInfos[method_nr];
  }
View Full Code Here

            return VerificationResult.VR_NOTYET;
        }

      } catch (ClassNotFoundException e) {
    // FIXME: this might not be the best way to handle missing classes.
    throw new AssertionViolatedException("Missing class: " + e.toString());
      }
  }
View Full Code Here

      }
    }

      } catch (ClassNotFoundException e) {
    // FIXME: this might not be the best way to handle missing classes.
    throw new AssertionViolatedException("Missing class: " + e.toString());
      }
  }
View Full Code Here

      jc = Repository.lookupClass(jc.getSuperclassName())// Well, for OBJECT this returns OBJECT so it works (could return anything but must not throw an Exception).
    }

      } catch (ClassNotFoundException e) {
    // FIXME: this might not be the best way to handle missing classes.
    throw new AssertionViolatedException("Missing class: " + e.toString());
      }

  }
View Full Code Here

    JavaClass jc = Repository.lookupClass(myOwner.getClassName());
    new CPESSC_Visitor(jc); // constructor implicitely traverses jc

      } catch (ClassNotFoundException e) {
    // FIXME: this might not be the best way to handle missing classes.
    throw new AssertionViolatedException("Missing class: " + e.toString());
      }
  }
View Full Code Here

    DescendingVisitor v = new DescendingVisitor(jc, new FAMRAV_Visitor(jc));
    v.visit();

      } catch (ClassNotFoundException e) {
    // FIXME: this might not be the best way to handle missing classes.
    throw new AssertionViolatedException("Missing class: " + e.toString());
      }
  }
View Full Code Here

  /**
   * Pushes a Type object onto the stack.
   */
  public void push(Type type){
    if (type == null) {
            throw new AssertionViolatedException("Cannot push NULL onto OperandStack.");
        }
    if (type == Type.BOOLEAN || type == Type.CHAR || type == Type.BYTE || type == Type.SHORT){
      throw new AssertionViolatedException("The OperandStack does not know about '"+type+"'; use Type.INT instead.");
    }
    if (slotsUsed() >= maxStack){
      throw new AssertionViolatedException("OperandStack too small, should have thrown proper Exception elsewhere. Stack: "+this);
    }
    stack.add(type);
  }
View Full Code Here

        }
      }
    }
      } catch (ClassNotFoundException e) {
    // FIXME: maybe not the best way to handle this
    throw new AssertionViolatedException("Missing class: " + e.toString());
      }
  }
View Full Code Here

TOP

Related Classes of org.apache.bcel.verifier.exc.AssertionViolatedException

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.