ca.quine.jcommons.sourceexporter
Class MarshallingContext
java.lang.Object
|
+--ca.quine.jcommons.sourceexporter.MarshallingContext
- public class MarshallingContext
- extends Object
Holds information and properties that keep track of and control source code
generation (such as which objects have been seen so far and what code
formatting style to use). The propertyMap
can be used by
marshallers to keep track of internal state, since only one marshaller
object is created for each ChainOfResponsibility
object. A
marshaller may create helper methods in the generated source code and keep
track of whether or not they have been added already with the
propertyMap
. Additional information can also be provided
to a marshaller before marshalling begins by putting entries into the
map. In order to avoid key collisions with other marshallers, use the fully
qualified class name of the marshaller as a prefix on the key.
It is recommended that a Marshaller produce code lines with tabs for
indenting. Refer to FormattingRules
for details.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MarshallingContext
public MarshallingContext()
getIdForObject
public Integer getIdForObject(Object object)
associateObject
public Integer associateObject(Object object)
getPropertyMap
public Map getPropertyMap()
getFormattingRules
public FormattingRules getFormattingRules()
getJustInitializedObjectMap
public Map getJustInitializedObjectMap()
isReduceSetterCallsByComparingWithInitializedObjects
public boolean isReduceSetterCallsByComparingWithInitializedObjects()
setReduceSetterCallsByComparingWithInitializedObjects
public void setReduceSetterCallsByComparingWithInitializedObjects(boolean reduceSetterCallsByComparingWithInitializedObjects)