|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) public @interface Text
The Text
annotation is used to represent a field or
method that appears as text within an XML element. Methods and
fields annotated with this must represent primitive values. One
restriction on this annotation is that it can only appear once
within a schema class, and it can not appear with the another XML
element annotations, such as the Element
annotation.
It can however appear with any number of Attribute
annotations.
<example one="value" two="value"> Example text value <example>Text values are used when an element containing attributes is used to wrap a text value with no child elements. This can be used in place of an element annotation to represent a primitive which is wrapped in a surrounding XML element.
Optional Element Summary | |
---|---|
boolean |
data
This is used to determine whether the text is written within CDATA block or not. |
boolean |
required
Determines whether the text value is required within the XML document. |
public abstract boolean data
public abstract boolean required
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |