sofya.mutator.verifier
Interface Verifier

All Known Implementing Classes:
JustIceVerifier, PlatformJVMVerifier

public interface Verifier

A verifier performs verification of Java classes and methods.

Version:
10/19/2005
Author:
Alex Kinneer

Nested Class Summary
static class Verifier.Pass
          Type-safe enumeration used for specifying levels of verification.
 
Method Summary
 void loadClass(org.apache.bcel.classfile.JavaClass clazz)
          Loads a class, overriding any existing definition of the class.
 void loadClass(java.lang.String className, byte[] classBytes)
          Loads a class, overriding any existing definition of the class.
 VerificationResult verify(java.lang.String className, java.lang.String methodName, java.lang.String signature, Verifier.Pass level)
          Verifies a method.
 VerificationResult verify(java.lang.String className, Verifier.Pass level)
          Verifies a class.
 

Method Detail

loadClass

void loadClass(org.apache.bcel.classfile.JavaClass clazz)
               throws VerifierException
Loads a class, overriding any existing definition of the class.

This method is used to instruct the verifier to load the mutated bytecode of the class to be verified. The verifier should therefore ensure that no subsequent requests to verify the given class will operate on any cached version of the class.

Parameters:
clazz - BCEL representation of the class to be loaded.
Throws:
VerifierException - If an error prevents the class from being loaded.

loadClass

void loadClass(java.lang.String className,
               byte[] classBytes)
               throws VerifierException
Loads a class, overriding any existing definition of the class.

This method is used to instruct the verifier to load the mutated bytecode of the class to be verified. The verifier should therefore ensure that no subsequent requests to verify the given class will operate on any cached version of the class.

Parameters:
className - Name of the class to be loaded.
classBytes - The bytes comprising the class to be loaded.
Throws:
VerifierException - If an error prevents the class from being loaded.

verify

VerificationResult verify(java.lang.String className,
                          java.lang.String methodName,
                          java.lang.String signature,
                          Verifier.Pass level)
                          throws VerifierException
Verifies a method.

Parameters:
className - Name of the class implementing the method to be verified.
methodName - Name of the method to be verified.
signature - Signature of the method to be verified.
level - Verification pass to be applied. Only passes 3a and 3b will actually verify the specific method.
Returns:
A verification result, containing information about the cause of failure if the method did not verify.
Throws:
VerifierException - If the verifier is unable to execute on the method for any reason, such as if requested method cannot be found in the given class.

verify

VerificationResult verify(java.lang.String className,
                          Verifier.Pass level)
                          throws VerifierException
Verifies a class.

Parameters:
className - Name of the class to be verified.
level - Verification pass to be applied. When chosen, passes 3a and 3b will be applied to every method in the class.
Returns:
A verification result, containing information about the cause of failure if the class did not verify.
Throws:
VerifierException - If the verifier is unable to execute on the class for any reason.