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
abstract class TemplateParameter extends java.lang.Object implements Parameter
TheTemplateParameter
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 eachParameter implementation.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TemplateParameter()
Constructor for theTemplateParameter
is used to create a template for other parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAttribute()
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
-
-
-
-
Method Detail
-
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.
-
-