ecologylab.xml.types.scalar
Class StringType

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.xml.types.scalar.ScalarType<T>
          extended by ecologylab.xml.types.scalar.ReferenceType<java.lang.String>
              extended by ecologylab.xml.types.scalar.StringType

public class StringType
extends ReferenceType<java.lang.String>

Type system entry for String. A very simple case.

Author:
andruid

Field Summary
 
Fields inherited from class ecologylab.xml.types.scalar.ScalarType
DEFAULT_DELIMS, DEFAULT_VALUE, DEFAULT_VALUE_STRING
 
Constructor Summary
StringType()
          This constructor should only be called once per session, through a static initializer, typically in TypeRegistry.
 
Method Summary
 void appendValue(java.lang.String instance, java.lang.Appendable appendable, boolean needsEscaping)
          Append the String directly, unless it needs escaping, in which case, call escapeXML.
 void appendValue(java.lang.String instance, java.lang.StringBuilder buffy, boolean needsEscaping)
          Append the String directly, unless it needs escaping, in which case, call escapeXML.
 java.lang.String getInstance(java.lang.String value)
          Just return the value itself.
 java.lang.String marshall(java.lang.String instance)
          Get a String representation of the instance, which is simply this.
 
Methods inherited from class ecologylab.xml.types.scalar.ScalarType
affordsInterestExpression, allowDelimitersInTokens, allowNewLines, appendValue, appendValue, composedOfTerms, defaultValue, defaultValueLength, defaultValueString, delimeters, getClassName, getTypeClass, illegalChars, isDefaultValue, isDefaultValue, isFloatingPoint, isPrimitive, isReference, needsEscaping, setField, setFieldError, toString
 
Methods inherited from class ecologylab.generic.Debug
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringType

public StringType()
This constructor should only be called once per session, through a static initializer, typically in TypeRegistry.

To get the instance of this type object for use in translations, call TypeRegistry.get("java.lang.String").

Method Detail

getInstance

public java.lang.String getInstance(java.lang.String value)
Just return the value itself. A transparent pass-through.

Specified by:
getInstance in class ScalarType<java.lang.String>
Parameters:
value - String representation of the instance.
See Also:
ScalarType.getInstance(java.lang.String)

marshall

public java.lang.String marshall(java.lang.String instance)
Get a String representation of the instance, which is simply this.

Overrides:
marshall in class ScalarType<java.lang.String>
Parameters:
instance -
Returns:

appendValue

public void appendValue(java.lang.String instance,
                        java.lang.StringBuilder buffy,
                        boolean needsEscaping)
Append the String directly, unless it needs escaping, in which case, call escapeXML.

Overrides:
appendValue in class ReferenceType<java.lang.String>
Parameters:
instance -
buffy -
needsEscaping -

appendValue

public void appendValue(java.lang.String instance,
                        java.lang.Appendable appendable,
                        boolean needsEscaping)
                 throws java.io.IOException
Append the String directly, unless it needs escaping, in which case, call escapeXML.

Overrides:
appendValue in class ReferenceType<java.lang.String>
Parameters:
instance -
appendable -
needsEscaping -
Throws:
java.io.IOException