FileDocCategorySizeDatePackage
VerificationResult.javaAPI DocJava SE 5 API5449Fri Aug 26 14:55:24 BST 2005com.sun.org.apache.bcel.internal.verifier

VerificationResult

public class VerificationResult extends Object
A VerificationResult is what a PassVerifier returns after verifying.
version
$Id: VerificationResult.java,v 1.1.1.1 2001/10/29 20:00:31 jvanzyl Exp $
author
Enver Haase

Fields Summary
public static final int
VERIFIED_NOTYET
Constant to indicate verification has not been tried yet. This happens if some earlier verification pass did not return VERIFIED_OK.
public static final int
VERIFIED_OK
Constant to indicate verification was passed.
public static final int
VERIFIED_REJECTED
Constant to indicate verfication failed.
private static final String
VERIFIED_NOTYET_MSG
This string is the canonical message for verifications that have not been tried yet. This happens if some earlier verification pass did not return VERIFIED_OK.
private static final String
VERIFIED_OK_MSG
This string is the canonical message for passed verification passes.
public static final VerificationResult
VR_NOTYET
Canonical VerificationResult for not-yet-tried verifications. This happens if some earlier verification pass did not return VERIFIED_OK.
public static final VerificationResult
VR_OK
Canonical VerificationResult for passed verifications.
private int
numeric
The numeric status.
private String
detailMessage
The detailed message.
Constructors Summary
private VerificationResult()
This class is not no-args instantiable.


	       
	 
public VerificationResult(int status, String message)
The usual constructor.

		numeric = status;
		detailMessage = message;
	
Methods Summary
public booleanequals(java.lang.Object o)
Returns if two VerificationResult instances are equal.

		if (! (o instanceof VerificationResult)) return false;
		VerificationResult other = (VerificationResult) o;
		return ((other.numeric == this.numeric) && (other.detailMessage.equals(this.detailMessage)));
	
public java.lang.StringgetMessage()
Returns a detailed message.

		return detailMessage;
	
public intgetStatus()
Returns one one the VERIFIED_OK, VERIFIED_NOTYET, VERIFIED_REJECTED constants.

		return numeric;
	
public java.lang.StringtoString()
Returns a String representation of the VerificationResult.

		String ret="";
		if (numeric == VERIFIED_NOTYET)   ret = "VERIFIED_NOTYET";
		if (numeric == VERIFIED_OK)       ret = "VERIFIED_OK";
		if (numeric == VERIFIED_REJECTED) ret = "VERIFIED_REJECTED";
		ret+="\n"+detailMessage+"\n";
		return ret;