public String handleBooleanAnnotation(String annotation, Boolean value, String message, String validate) {

		if (!Boolean.TRUE.equals(value))
			return "";

		// if validate contains annotation, do nothing
		if (validate != null && validate.toLowerCase().matches(".*@" + annotation.toLowerCase() + ".*"))
			return "";

		String result = " @" + annotation;

		// set message if not set
		if (message != null) {
			result += "(" + (message.toLowerCase().matches(".*message.*") ? "" : "message=") + message + ")";
		}

		return result + " ";
	}
public String handleBooleanAnnotation ( String annotation , Boolean value , String message , String validate ) { if ( ! Boolean . TRUE . equals ( value ) ) return "" ; if ( validate != null && validate . toLowerCase ( ) . matches ( ".*@" + annotation . toLowerCase ( ) + ".*" ) ) return "" ; String result = " @" + annotation ; if ( message != null ) { result += "(" + ( message . toLowerCase ( ) . matches ( ".*message.*" ) ? "" : "message=" ) + message + ")" ; } return result + " " ; }
Handles all boolean validation annotations (Future, Past, Email, ...).

@param annotation
the name of the annotation
@param value
annotation is set or not
@param validate
the validate string
@return annotation validation string