ecologylab.xml
Class Optimizations

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.xml.Optimizations
All Implemented Interfaces:
OptimizationTypes

public class Optimizations
extends Debug
implements OptimizationTypes

Cached object that holds all of the structures needed to optimize translations to and from XML for a single subclass of ElementState. A rootOptimizationsMap keeps track of these, using the XML tag as the key.

This structure itself, as well as the structure within it, are created just in time, by lazy evaluation.

Author:
andruid

Field Summary
 
Fields inherited from interface ecologylab.xml.OptimizationTypes
BAD_FIELD, COLLECTION_ELEMENT, COLLECTION_SCALAR, IGNORED_ATTRIBUTE, IGNORED_ELEMENT, LEAF_NODE_VALUE, MAP_ELEMENT, MAP_SCALAR, NAME_SPACE_ATTRIBUTE, NAME_SPACE_LEAF_NODE, NAME_SPACE_MASK, NAME_SPACE_NESTED_ELEMENT, NAMESPACE_IGNORED_ELEMENT, NAMESPACE_TRIAL_ELEMENT, OTHER_NESTED_ELEMENT, REGULAR_ATTRIBUTE, REGULAR_NESTED_ELEMENT, ROOT, UNSET_TYPE, XMLNS_ATTRIBUTE, XMLNS_IGNORED
 
Method Summary
 java.util.ArrayList<java.lang.reflect.Field> elementFields()
          Get the fields that are represented as nested elements (including leaf nodes) for the class we're optimizing.
 java.util.ArrayList<java.lang.reflect.Field> getFields()
          Build and return an ArrayList with Field objects for all the annotated fields in this class.
 java.lang.String toString()
           
 
Methods inherited from class ecologylab.generic.Debug
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, 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, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getFields

public java.util.ArrayList<java.lang.reflect.Field> getFields()
Build and return an ArrayList with Field objects for all the annotated fields in this class.

Returns:
ArrayList of Field objects. Could be empty. Never null.

elementFields

public java.util.ArrayList<java.lang.reflect.Field> elementFields()
Get the fields that are represented as nested elements (including leaf nodes) for the class we're optimizing. Uses lazy evaluation -- while derive the answer for attributefieldbs and elementFields, and cache it.

Returns:
ArrayList of Field objects.

toString

public java.lang.String toString()
Overrides:
toString in class Debug