Examples of doPass2()


Examples of org.apache.bcel.verifier.Verifier.doPass2()

           
            // run validation in stages with error handling for each stage
            boolean verified = false;
            VerificationResult vr = verifier.doPass1();
            if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
                vr = verifier.doPass2();
                if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
                    Method[] methods = file.getRawClass().getMethods();
                    for (int j = 0; j < methods.length; j++) {
                        vr = verifier.doPass3a(j);
                        if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier.doPass2()

    JavaClass jc = clGen.getJavaClass();
    Repository.addClass( jc );

    Verifier v = VerifierFactory.getVerifier( jc.getClassName() );
    checkVerificationResult(v.doPass1(), "1");
    checkVerificationResult(v.doPass2(), "2");
    MethodWeaver methodWeavers[] = new MethodWeaver[methods.size()];
    methods.values().toArray( methodWeavers );
    for( int i = 0; i < methods.size(); i++ ) {
      int method_index = methodWeavers[i].targetIndex;
      checkVerificationResult(v.doPass3a(method_index), "3a");
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier.doPass2()

    JavaClass jc = clGen.getJavaClass();
    Repository.addClass( jc );

    Verifier v = VerifierFactory.getVerifier( jc.getClassName() );
    checkVerificationResult(v.doPass1(), "1");
    checkVerificationResult(v.doPass2(), "2");
    MethodWeaver methodWeavers[] = new MethodWeaver[methods.size()];
    methods.values().toArray( methodWeavers );
    for( int i = 0; i < methods.size(); i++ ) {
      int method_index = methodWeavers[i].getTargetIndex();
      checkVerificationResult(v.doPass3a(method_index), "3a");
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier.doPass2()

   */
  public void visitLoadClass(LoadClass o){
    ObjectType t = o.getLoadClassType(cpg);
    if (t != null){// null means "no class is loaded"
      Verifier v = VerifierFactory.getVerifier(t.getClassName());
      VerificationResult vr = v.doPass2();
      if (vr.getStatus() != VerificationResult.VERIFIED_OK){
        constraintViolated((Instruction) o, "Class '"+o.getLoadClassType(cpg).getClassName()+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
      }
    }
  }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier.doPass2()

      // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
      Type t = o.getType(cpg);
      if (t instanceof ObjectType){
        String name = ((ObjectType)t).getClassName();
        Verifier v = VerifierFactory.getVerifier( name );
        VerificationResult vr = v.doPass2();
        if (vr.getStatus() != VerificationResult.VERIFIED_OK){
          constraintViolated((Instruction) o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
        }
      }
   }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier.doPass2()

    Type t = o.getType(cpg);
    if (t instanceof ObjectType){
      String name = ((ObjectType)t).getClassName();
      Verifier v = VerifierFactory.getVerifier( name );
      VerificationResult vr = v.doPass2();
      if (vr.getStatus() != VerificationResult.VERIFIED_OK){
        constraintViolated((Instruction) o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
      }
    }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier.doPass2()

    Type t = o.getType(cpg);
    if (t instanceof ObjectType){
      String name = ((ObjectType)t).getClassName();
      Verifier v = VerifierFactory.getVerifier( name );
      VerificationResult vr = v.doPass2();
      if (vr.getStatus() != VerificationResult.VERIFIED_OK){
        constraintViolated((Instruction) o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
      }
    }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier.doPass2()

   
    Type t = o.getType(cpg);
    if (t instanceof ObjectType){
      String name = ((ObjectType)t).getClassName();
      Verifier v = VerifierFactory.getVerifier( name );
      VerificationResult vr = v.doPass2();
      if (vr.getStatus() != VerificationResult.VERIFIED_OK){
        constraintViolated((Instruction) o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
      }
    }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier.doPass2()

    Type t = o.getType(cpg);
    if (t instanceof ObjectType){
      String name = ((ObjectType)t).getClassName();
      Verifier v = VerifierFactory.getVerifier( name );
      VerificationResult vr = v.doPass2();
      if (vr.getStatus() != VerificationResult.VERIFIED_OK){
        constraintViolated((Instruction) o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
      }
    }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier.doPass2()

      if (t instanceof ArrayType){
        t = ((ArrayType) t).getBasicType();
      }
      if (t instanceof ObjectType){
        Verifier v = VerifierFactory.getVerifier(((ObjectType) t).getClassName());
        VerificationResult vr = v.doPass2();
        if (vr.getStatus() != VerificationResult.VERIFIED_OK){
          constraintViolated(o, "Return type class/interface could not be verified successfully: '"+vr.getMessage()+"'.");
        }
      }
     
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.