|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
@Documented
public @interface ExactLengthChecks if annotated method/field returns the exact length of this annotation. Can be annotated on fields or methods returning String, StringBuffer or StringBuilder.
| Required Element Summary | |
|---|---|
long |
value
The exact length a field/methods value must have. |
| 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
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 value
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 | ||||||||