ecologylab.xml.types.scalar
Class ClassType

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.Class>
              extended by ecologylab.xml.types.scalar.ClassType

public class ClassType
extends ReferenceType<java.lang.Class>

For marshalling Class objects themselves. Particularly useful in ports.

Author:
andruid

Field Summary
 
Fields inherited from class ecologylab.xml.types.scalar.ScalarType
DEFAULT_DELIMS, DEFAULT_DELIMS_TOKENIZER, DEFAULT_VALUE, DEFAULT_VALUE_STRING, MINIMAL_DELIM
 
Constructor Summary
ClassType()
           
 
Method Summary
 java.lang.Class getInstance(java.lang.String value, java.lang.String[] formatStrings, ScalarUnmarshallingContext scalarUnmarshallingContext)
          Create a class object, using the value as a fully qualified class name.
 java.lang.String marshall(java.lang.Class instance)
          The string representation for a Field of the type Class
 
Methods inherited from class ecologylab.xml.types.scalar.ReferenceType
appendValue, appendValue
 
Methods inherited from class ecologylab.xml.types.scalar.ScalarType
affordsInterestExpression, allowDelimitersInTokens, allowNewLines, appendValue, appendValue, composedOfTerms, defaultValueLength, delimeters, delimitersTokenizer, fieldTypeName, getClassName, getInstance, getTypeClass, illegalChars, isDefaultValue, isDefaultValue, isFloatingPoint, isMarshallOnly, isPrimitive, isReference, needsEscaping, primaryDelimiter, setField, setField, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassType

public ClassType()
Method Detail

getInstance

public java.lang.Class getInstance(java.lang.String value,
                                   java.lang.String[] formatStrings,
                                   ScalarUnmarshallingContext scalarUnmarshallingContext)
Create a class object, using the value as a fully qualified class name. Use the TranslationScope name passed in as the first formatString argument, if there is one, as the source of the Class. Otherwise, use Class.forName().

Specified by:
getInstance in class ScalarType<java.lang.Class>
Parameters:
value - String representation of the instance.
formatStrings - Array of formatting values.
scalarUnmarshallingContext - TODO

marshall

public java.lang.String marshall(java.lang.Class instance)
The string representation for a Field of the type Class

Overrides:
marshall in class ScalarType<java.lang.Class>
Returns: