Package org.simpleframework.xml.core
Class TemplateParameter
java.lang.Object
org.simpleframework.xml.core.TemplateParameter
- All Implemented Interfaces:
Parameter
- Direct Known Subclasses:
AttributeParameter
,ElementArrayParameter
,ElementListParameter
,ElementListUnionParameter
,ElementMapParameter
,ElementMapUnionParameter
,ElementParameter
,ElementUnionParameter
,TextParameter
The Parameter implementation.
TemplateParameter
object is used to provide stock
functions that can be used by all implementations. This ensures
there is a consistent set of behaviours for each parameter. It
also reduces the number of methods that need to be maintained for
each -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor for theTemplateParameter
is used to create a template for other parameters. -
Method Summary
Modifier and TypeMethodDescriptionboolean
This method is used to determine if the parameter represents an attribute.boolean
isText()
This is used to determine if the parameter represents text.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.simpleframework.xml.core.Parameter
getAnnotation, getExpression, getIndex, getKey, getName, getPath, getType, isPrimitive, isRequired, toString
-
Constructor Details
-
TemplateParameter
protected TemplateParameter()Constructor for theTemplateParameter
is used to create a template for other parameters. If any of the method implementations are not as required they should be overridden by the subclass.
-
-
Method Details
-
isAttribute
public boolean isAttribute()This method is used to determine if the parameter represents an attribute. This is used to style the name so that elements are styled as elements and attributes are styled as required.- Specified by:
isAttribute
in interfaceParameter
- Returns:
- this is used to determine if this is an attribute
-
isText
public boolean isText()This is used to determine if the parameter represents text. If this represents text it typically does not have a name, instead the empty string represents the name. Also text parameters can not exist with other text parameters.
-