Package com.apama.event.parser
Class StringFieldType
- java.lang.Object
-
- com.apama.event.parser.FieldType<java.lang.String>
-
- com.apama.event.parser.StringFieldType
-
public class StringFieldType extends FieldType<java.lang.String>
Represents the Apamastring
type, for which values are specified asString
objects.This class cannot be instantiated explicitly, but should be referenced using
FieldTypes.STRING
.
-
-
Field Summary
Fields Modifier and Type Field Description static StringFieldType
TYPE
Singleton instance of this type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertAssignable(java.lang.Object c, java.lang.String fieldName)
This method is intended for internal use only and may be removed at any time - do not use.java.lang.String
defaultValue()
Get the default value for String field type.java.lang.String
parse(java.lang.String value)
Convert a value of this type from the format used in Apama event strings, into a String object containing the string's contents (without the surrounding quotes and any escape characters).
-
-
-
Field Detail
-
TYPE
public static final StringFieldType TYPE
Singleton instance of this type.
-
-
Method Detail
-
assertAssignable
public void assertAssignable(java.lang.Object c, java.lang.String fieldName)
Description copied from class:FieldType
This method is intended for internal use only and may be removed at any time - do not use.- Specified by:
assertAssignable
in classFieldType<java.lang.String>
-
parse
public java.lang.String parse(java.lang.String value) throws ParserRuntimeException
Convert a value of this type from the format used in Apama event strings, into a String object containing the string's contents (without the surrounding quotes and any escape characters).- Overrides:
parse
in classFieldType<java.lang.String>
- Parameters:
value
- the value to parse (including the surrounding quotes).- Returns:
- an object specifying the value of the string that was parsed.
- Throws:
ParserRuntimeException
- If the specified value string cannot be parsed.
-
defaultValue
public java.lang.String defaultValue()
Get the default value for String field type.- Specified by:
defaultValue
in classFieldType<java.lang.String>
- Returns:
- ""
-
-