1 11 12 package org.eclipse.jface.internal.databinding.provisional.validation; 13 14 18 public class ValidationError { 19 20 23 public static final int WARNING = 1; 24 25 28 public static final int ERROR = 2; 29 30 33 public final int status; 34 35 38 public final String message; 39 40 46 public static ValidationError error(String message) { 47 return new ValidationError(ERROR, message); 48 } 49 50 56 public static ValidationError warning(String message) { 57 return new ValidationError(WARNING, message); 58 } 59 60 66 public ValidationError(int status, String message) { 67 this.status = status; 68 this.message = message; 69 } 70 71 public String toString() { 72 return message; 73 } 74 } 75 76 | Popular Tags |