Package org.simpleframework.xml.stream
Class IdentityStyle
java.lang.Object
org.simpleframework.xml.stream.IdentityStyle
- All Implemented Interfaces:
Style
The
IdentityStyle
object is used to represent a style
that does not modify the tokens passed in to it. This is used if
there is no style specified or if there is no need to convert the
XML elements an attributes to a particular style. This is also
the most performant style as it does not require cache lookups.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String name) This is basically a pass through method.getElement
(String name) This is basically a pass through method.
-
Constructor Details
-
IdentityStyle
IdentityStyle()
-
-
Method Details
-
getAttribute
This is basically a pass through method. It will return the same string as is passed in to it. This ensures the best performant when no styling is required for the XML document.- Specified by:
getAttribute
in interfaceStyle
- Parameters:
name
- this is the token that is to be styled by this- Returns:
- this returns the same string that is passed in
-
getElement
This is basically a pass through method. It will return the same string as is passed in to it. This ensures the best performant when no styling is required for the XML document.- Specified by:
getElement
in interfaceStyle
- Parameters:
name
- this is the token that is to be styled by this- Returns:
- this returns the same string that is passed in
-