Update of /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/constraint/result
In directory sc8-pr-cvs1:/tmp/cvs-serv19694/src/java/org/krysalis/version/constraint/result
Modified Files:
ConstraintResult.java
Log Message:
Making constraint processing more descriptive
Index: ConstraintResult.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/constraint/result/ConstraintResult.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ConstraintResult.java 5 Mar 2003 19:57:32 -0000 1.1
--- ConstraintResult.java 6 Mar 2003 02:58:40 -0000 1.2
***************
*** 72,79 ****
public class ConstraintResult implements Dumpable {
! static final int UNSET = 0;
! static final int INFORMATION = 1;
! static final int WARNING = 2;
! static final int ERROR = 3;
private int m_severity = UNSET;
--- 72,79 ----
public class ConstraintResult implements Dumpable {
! public static final int UNSET = 0;
! public static final int INFORMATION = 1;
! public static final int WARNING = 2;
! public static final int ERROR = 3;
private int m_severity = UNSET;
***************
*** 199,202 ****
--- 199,216 ----
}
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+
+ buffer.append(getSeverityAsString());
+ buffer.append(": ");
+
+ buffer.append(m_constraint);
+ buffer.append(": ");
+
+ buffer.append(m_conclusion.toString());
+
+ return buffer.toString();
+ }
+
public void dump(PrintWriter out, int depth) {
String indent = DebugUtils.getIndent(depth);
***************
*** 205,208 ****
--- 219,228 ----
out.print("Severity: ");
out.println(getSeverityAsString());
+
+ if (null != m_message) {
+ out.print(indent);
+ out.print("Message: ");
+ out.println(m_message);
+ }
out.print(indent);
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.