org.ws4d.java.types
Class StringAttributeParser

java.lang.Object
  extended by org.ws4d.java.types.StringAttributeParser
All Implemented Interfaces:
CustomAttributeParser

public class StringAttributeParser
extends java.lang.Object
implements CustomAttributeParser

Parser for custom attributes of type String. Simply returns the same attribute value as obtained from the underlying XML parser wrapped within a StringAttributeValue instance.


Field Summary
static CustomAttributeParser INSTANCE
           
 
Constructor Summary
StringAttributeParser()
           
 
Method Summary
 CustomAttributeValue parse(org.xmlpull.v1.XmlPullParser parser, int attributeIndex)
          Returns a custom attribute value instance created from the attribute at the specified attributeIndex from the given parser.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final CustomAttributeParser INSTANCE
Constructor Detail

StringAttributeParser

public StringAttributeParser()
Method Detail

parse

public CustomAttributeValue parse(org.xmlpull.v1.XmlPullParser parser,
                                  int attributeIndex)
Description copied from interface: CustomAttributeParser
Returns a custom attribute value instance created from the attribute at the specified attributeIndex from the given parser.

Specified by:
parse in interface CustomAttributeParser
Parameters:
parser - the parser the attribute is read from
attributeIndex - the index of the attribute, at which it can be obtained from the parser
Returns:
an instance representing the attribute value as a Java object of a specific type