|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
@Documented
public @interface BetweenLengthChecks if annotated method returns a value where the length <<<<<<< .mine is between the length of this annotation. Can be annotated on fields or methods returning String, StringBuffer or StringBuilder. ======= is between the length of this annotation. Can be annotated on fields or methods returning String or StringBuffer. >>>>>>> .r57
The length is 'inclusive', meaning that value >= minimumLength and value <= maximumLength.
| Required Element Summary | |
|---|---|
long |
maximumLength
The maximum length the method's value must be. |
long |
minimumLength
The minimum length the method's value must be. |
| Optional Element Summary | |
|---|---|
java.lang.String[] |
applyToGroups
Specify for which groups this annotation must be applied. |
java.lang.String |
charSet
Relevant only if countAs() has been set to 'byte', then this property determines how the String is converted to bytes (using this charset). |
java.lang.String |
countAs
New since 1.2, tells how the length must be determined. |
java.lang.String |
customCode
Optional custom code (property from a properties file). |
boolean |
globalMessage
If this annotation's message must be added as global message instead of real validation path. |
| Element Detail |
|---|
public abstract long minimumLength
Defaults to nothing (0 by java specs).
public abstract long maximumLength
Defaults to nothing (0 by java specs)
public abstract java.lang.String countAs
If byte is specified you may also need to override the characterset, it defaults to UTF-8 (when converting to bytes), set charSet in that case.
Chose char or byte, defaults to char.
public abstract java.lang.String charSet
public abstract java.lang.String[] applyToGroups
Defaults to JvGroup.GROUP_APPLY_ALL
public abstract java.lang.String customCode
This way you can override the default message if needed.
public abstract boolean globalMessage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||