Package org.opencypher.tools.xml
Annotation Type Attribute
-
@Target({FIELD,METHOD}) @Retention(RUNTIME) public @interface Attribute
Handle an XML attribute. A field or method annotated with this annotation will be used to handle attributes with the given name from an XML element.
-
-
-
name
String name
The name of the attribute. If no name is given, the name of the annotated field or method is used.- Returns:
- the name of this attribute.
- Default:
- ""
-
-
-
optional
boolean optional
Whether this attribute is optional or mandatory. The default is for an attribute to be mandatory. If the namespace of this attribute is not the same as the namespace of the enclosing class, the attribute must be specified as optional.- Returns:
trueif this attribute is optional,falseif this attribute is mandatory.
- Default:
- false
-
-