Class DefaultObjectHandler
- java.lang.Object
-
- org.nuiton.jaxx.compiler.tags.DefaultObjectHandler
-
- All Implemented Interfaces:
TagHandler
- Direct Known Subclasses:
BeanValidatorHandler,DefaultComponentHandler,TabHandler,TabWithValidatorHandler
public class DefaultObjectHandler extends Object implements TagHandler
Default handler for class tags. Class tags are tags which represent instances of Java classes, such as<JButton label='Close'/>.DefaultObjectHandlerprovides support for attributes and events which adhere to JavaBeans naming conventions as well as basic JAXX features like theidattribute and data binding by means of curly braces.Throughout this class, the word "member" refers to the name of a field or method (e.g.
"getDocument") and the word "property" refers to the JavaBeans-style simple name of a property (e.g."document").
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultObjectHandler.ProxyEventInfoEncapsulates information about a "proxy event handler", which is an event handler that fires PropertyChangeEvents when it is triggered.
-
Field Summary
Fields Modifier and Type Field Description static StringABSTRACT_ATTRIBUTEstatic StringBORDER_LAYOUT_PREFIXstatic StringCONSTRAINTS_ATTRIBUTEstatic StringCONSTRUCTOR_PARAMS_ATTRIBUTEstatic StringDECORATOR_ATTRIBUTEstatic StringDISPLAYED_MNEMONIC_ATTRIBUTEstatic StringDISPLAYED_MNEMONIC_INDEX_ATTRIBUTEstatic StringGENERIC_TYPE_ATTRIBUTEstatic StringGRID_LAYOUT_PREFIXstatic StringHANDLER_ATTRIBUTEstatic StringI18N_ATTRIBUTEstatic StringI18N_PROPERTY_ATTRIBUTEstatic StringID_ATTRIBUTEstatic StringIMPLEMENTS_ATTRIBUTEstatic StringINITIALIZER_ATTRIBUTEstatic StringJAVA_BEAN_ATTRIBUTEprotected JAXXBeanInfojaxxBeanInfoThe JAXXBeanInfo for the beanClass.static StringLAYOUT_ATTRIBUTEstatic StringMNEMONIC_ATTRIBUTEprotected static Map<Element,CompiledObject>objectMapMaps XML tags to the CompiledObjects created from them.static StringOVERRIDE_PARAMETERstatic StringSTYLE_CLASS_ATTRIBUTEstatic StringSUPER_GENERIC_TYPE_ATTRIBUTE-
Fields inherited from interface org.nuiton.jaxx.compiler.tags.TagHandler
XMLNS_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description DefaultObjectHandler(ClassDescriptor beanClass)Creates a newDefaultObjectHandlerwhich provides support for the specified class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEventHandler(CompiledObject object, String name, String value, JAXXCompiler compiler)Adds the necessary Java code to aCompiledObjectto add an event listener at runtime.voidaddProxyEventInfo(String memberName, Class<?> listenerClass)Configures a proxy event handler which firesPropertyChangeEventswhen a non-bound member is updated.voidaddProxyEventInfo(String memberName, Class<?> listenerClass, String modelName)Configures a proxy event handler which firesPropertyChangeEventswhen a non-bound member is updated.voidaddProxyEventInfo(String memberName, Class<?> listenerClass, String modelName, String addMethod, String removeMethod)voidaddProxyEventInfo(String memberName, ClassDescriptor listenerClass, String modelName, String addMethod, String removeMethod)Configures a proxy event handler which firesPropertyChangeEventswhen a non-bound member is updated.voidapplyStylesheets(CompiledObject object, JAXXCompiler compiler)static StringcleanConstructorParams(String value)protected voidcompileChildrenFirstPass(Element tag, JAXXCompiler compiler)Compiles the child tags of the current tag.protected voidcompileChildrenSecondPass(Element tag, JAXXCompiler compiler)Compiles the child tags of the current tag.protected voidcompileChildTagFirstPass(Element tag, JAXXCompiler compiler)Compiles a child of the current tag.protected voidcompileChildTagSecondPass(Element tag, JAXXCompiler compiler)Compiles a child of the current tag.voidcompileFirstPass(Element tag, JAXXCompiler compiler)Performs the first pass of compilation on an XML tag from a JAXX source file.voidcompileSecondPass(Element tag, JAXXCompiler compiler)Performs the second pass of compilation on an XML tag from a JAXX source file.protected voidconfigureProxyEventInfo()Configures the event handling for members which do not firePropertyChangeEventwhen modified.protected intconstantValue(String key, String value)Maps string values onto integers, so that int-valued enumeration properties can be specified by strings.protected ObjectconvertFromString(String key, String value, Class<?> type)AsTypeManager.convertFromString(String, Class), except that it additionally supports constant names forint-valued types.protected CompiledObjectcreateCompiledObject(String id, JAXXCompiler compiler)Creates theCompiledObjectwhich will represent the object created by thisTagHandler.protected Comparator<Attr>getAttributeComparator()Returns aComparatorwhich defines the ordering in which the tag's attributes should be processed.protected intgetAttributeOrdering(Attr attr)Returns the priority with which a particular attribute should be processed.ClassDescriptorgetBeanClass()static ClassDescriptorgetEventClass(ClassDescriptor listenerClass)DefaultObjectHandler.ProxyEventInfogetEventInfo(String memberName)StringgetGetPropertyCode(String javaCode, String name, JAXXCompiler compiler)Returns a snippet of Java code which will retrieve an object property at runtime.JAXXBeanInfogetJAXXBeanInfo()static JAXXBeanInfogetJAXXBeanInfo(ClassDescriptor beanClass)Returns theJAXXBeanInfofor the specified class.ClassDescriptorgetPropertyType(CompiledObject object, String propertyName, JAXXCompiler compiler)Returns the type of the named property.protected CompiledObjectgetSafeCompiledObject(Element tag, JAXXCompiler compiler)StringgetSetPropertyCode(String javaCode, String name, String valueCode, JAXXCompiler compiler)Returns a snippet of Java code which will set an object property at runtime.protected voidinit()Performs introspection on the beanClass and stores the results.booleanisEventHandlerName(String name)booleanisMemberBound(String name)booleanisPropertyInherited(String property)voidregisterCompiledObject(Element tag, JAXXCompiler compiler)protected voidsafeInit()protected voidscanAttributesForDependencies(Element tag, JAXXCompiler compiler)Scans all attributes for any dependency classes and adds them to the current compilation set.voidsetAttribute(CompiledObject object, String propertyName, String stringValue, boolean inline, JAXXCompiler compiler)Set a single property on an object.voidsetAttributeFromCss(CompiledObject object, String propertyName, String stringValue, JAXXCompiler compiler)Set a single property on an object.voidsetAttributes(CompiledObject object, Element tag, JAXXCompiler compiler)Processes the attributes of an XML tag.protected voidsetDefaults(CompiledObject object, Element tag, JAXXCompiler compiler)Initializes the default settings of the object, prior to setting its attribute values.voidsetProperty(CompiledObject object, String name, Object value, JAXXCompiler compiler)Appends Java code to aCompiledObjectin order to implement a property assignment.StringtoString()
-
-
-
Field Detail
-
HANDLER_ATTRIBUTE
public static final String HANDLER_ATTRIBUTE
- See Also:
- Constant Field Values
-
ABSTRACT_ATTRIBUTE
public static final String ABSTRACT_ATTRIBUTE
- See Also:
- Constant Field Values
-
CONSTRAINTS_ATTRIBUTE
public static final String CONSTRAINTS_ATTRIBUTE
- See Also:
- Constant Field Values
-
CONSTRUCTOR_PARAMS_ATTRIBUTE
public static final String CONSTRUCTOR_PARAMS_ATTRIBUTE
- See Also:
- Constant Field Values
-
DECORATOR_ATTRIBUTE
public static final String DECORATOR_ATTRIBUTE
- See Also:
- Constant Field Values
-
DISPLAYED_MNEMONIC_ATTRIBUTE
public static final String DISPLAYED_MNEMONIC_ATTRIBUTE
- See Also:
- Constant Field Values
-
DISPLAYED_MNEMONIC_INDEX_ATTRIBUTE
public static final String DISPLAYED_MNEMONIC_INDEX_ATTRIBUTE
- See Also:
- Constant Field Values
-
GENERIC_TYPE_ATTRIBUTE
public static final String GENERIC_TYPE_ATTRIBUTE
- See Also:
- Constant Field Values
-
ID_ATTRIBUTE
public static final String ID_ATTRIBUTE
- See Also:
- Constant Field Values
-
IMPLEMENTS_ATTRIBUTE
public static final String IMPLEMENTS_ATTRIBUTE
- See Also:
- Constant Field Values
-
INITIALIZER_ATTRIBUTE
public static final String INITIALIZER_ATTRIBUTE
- See Also:
- Constant Field Values
-
JAVA_BEAN_ATTRIBUTE
public static final String JAVA_BEAN_ATTRIBUTE
- See Also:
- Constant Field Values
-
LAYOUT_ATTRIBUTE
public static final String LAYOUT_ATTRIBUTE
- See Also:
- Constant Field Values
-
MNEMONIC_ATTRIBUTE
public static final String MNEMONIC_ATTRIBUTE
- See Also:
- Constant Field Values
-
STYLE_CLASS_ATTRIBUTE
public static final String STYLE_CLASS_ATTRIBUTE
- See Also:
- Constant Field Values
-
SUPER_GENERIC_TYPE_ATTRIBUTE
public static final String SUPER_GENERIC_TYPE_ATTRIBUTE
- See Also:
- Constant Field Values
-
I18N_ATTRIBUTE
public static final String I18N_ATTRIBUTE
- See Also:
- Constant Field Values
-
I18N_PROPERTY_ATTRIBUTE
public static final String I18N_PROPERTY_ATTRIBUTE
- See Also:
- Constant Field Values
-
GRID_LAYOUT_PREFIX
public static final String GRID_LAYOUT_PREFIX
-
BORDER_LAYOUT_PREFIX
public static final String BORDER_LAYOUT_PREFIX
-
OVERRIDE_PARAMETER
public static final String OVERRIDE_PARAMETER
- See Also:
- Constant Field Values
-
objectMap
protected static final Map<Element,CompiledObject> objectMap
Maps XML tags to the CompiledObjects created from them.
-
jaxxBeanInfo
protected JAXXBeanInfo jaxxBeanInfo
The JAXXBeanInfo for the beanClass.
-
-
Constructor Detail
-
DefaultObjectHandler
public DefaultObjectHandler(ClassDescriptor beanClass)
Creates a newDefaultObjectHandlerwhich provides support for the specified class. The class is not actually introspected until thecompileFirstPass(org.w3c.dom.Element, org.nuiton.jaxx.compiler.JAXXCompiler)method is invoked.- Parameters:
beanClass- the class which this handler supports
-
-
Method Detail
-
getJAXXBeanInfo
public static JAXXBeanInfo getJAXXBeanInfo(ClassDescriptor beanClass)
Returns theJAXXBeanInfofor the specified class.- Parameters:
beanClass- the bean class for which to retrieveJAXXBeanInfo- Returns:
- the class'
JAXXBeanInfo
-
getEventClass
public static ClassDescriptor getEventClass(ClassDescriptor listenerClass)
-
getEventInfo
public DefaultObjectHandler.ProxyEventInfo getEventInfo(String memberName)
-
init
protected void init() throws IntrospectionExceptionPerforms introspection on the beanClass and stores the results.- Throws:
IntrospectionException- if any pb
-
getBeanClass
public ClassDescriptor getBeanClass()
- Returns:
- the class which this
DefaultObjectHandlersupports.
-
getJAXXBeanInfo
public JAXXBeanInfo getJAXXBeanInfo()
- Returns:
- the
JAXXBeanInfofor the class which thisDefaultObjectHandlersupports.
-
getPropertyType
public ClassDescriptor getPropertyType(CompiledObject object, String propertyName, JAXXCompiler compiler)
Returns the type of the named property. This is the return type of the property'sgetmethod; for instanceJLabel'stextproperty is aString.- Parameters:
object- the object being compiledpropertyName- the simple JavaBeans-style name of the propertycompiler- the currentJAXXCompiler- Returns:
- the property's type
- Throws:
CompilerException- if the type cannot be determined
-
isMemberBound
public boolean isMemberBound(String name) throws UnsupportedAttributeException
- Parameters:
name- name of the property- Returns:
trueif the named member is bound (firesPropertyChangeEventwhen modified). Members are either fields (represented by the simple name of the field) orget/ismethods (represented by the simple name of the method, not the simplified JavaBeans-style name). Methods which are not actually bound in their native class, but for which proxy events have been configured (such asJTextField.getText, returntrue.- Throws:
UnsupportedAttributeException- if attribute is not supported
-
configureProxyEventInfo
protected void configureProxyEventInfo()
Configures the event handling for members which do not firePropertyChangeEventwhen modified. The default implementation does nothing. Subclasses should override this method to calladdProxyEventInfofor each member which requires special handling.
-
addProxyEventInfo
public void addProxyEventInfo(String memberName, Class<?> listenerClass)
Configures a proxy event handler which firesPropertyChangeEventswhen a non-bound member is updated. This is necessary for all fields (which cannot be bound) and for methods that are not bound propertygetmethods. The proxy event handler will attach the specified kind of listener to the class and fire aPropertyChangeEventwhenever the listener receives any kind of event.Even though this method can theoretically be applied to fields (in addition to methods), it would be an unusual situation in which that would actually work -- as fields cannot fire events when modified, it would be difficult to have a listener that was always notified when a field value changed.
- Parameters:
memberName- the name of the field or method being proxiedlistenerClass- the type of listener which receives events when the field or method is updated
-
addProxyEventInfo
public void addProxyEventInfo(String memberName, Class<?> listenerClass, String modelName)
Configures a proxy event handler which firesPropertyChangeEventswhen a non-bound member is updated. This is necessary for all fields (which cannot be bound) and for methods that are not bound propertygetmethods. This variant attaches a listener to a property of the object (such asmodel) and not the object itself, which is useful when there is a model that is the "real" container of the information. The proxy event handler will attach the specified kind of listener to the property's value (retrieved using the property'sgetmethod) and fire aPropertyChangeEventwhenever the listener receives any kind of event.If the property is itself bound (typically the case with models), any updates to the property's value will cause the listener to be removed from the old property value and reattached to the new property value, as well as cause a
PropertyChangeEventto be fired.Even though this method can theoretically be applied to fields (in addition to methods), it would be an unusual situation in which that would actually work -- as fields cannot fire events when modified, it would be difficult to have a listener that was always notified when a field value changed.
- Parameters:
memberName- the name of the field or method being proxiedlistenerClass- the type of listener which receives events when the field or method is updatedmodelName- the JavaBeans-style name of the model property
-
addProxyEventInfo
public void addProxyEventInfo(String memberName, Class<?> listenerClass, String modelName, String addMethod, String removeMethod)
-
addProxyEventInfo
public void addProxyEventInfo(String memberName, ClassDescriptor listenerClass, String modelName, String addMethod, String removeMethod)
Configures a proxy event handler which firesPropertyChangeEventswhen a non-bound member is updated. This is necessary for all fields (which cannot be bound) and for methods that are not bound propertygetmethods. This variant attaches a listener to a property of the object (such asmodel) and not the object itself, which is useful when there is a model that is the "real" container of the information. The proxy event handler will attach the specified kind of listener to the property's value (retrieved using the property'sgetmethod) and fire aPropertyChangeEventwhenever the listener receives any kind of event.If the property is itself bound (typically the case with models), any updates to the property's value will cause the listener to be removed from the old property value and reattached to the new property value, as well as cause a
PropertyChangeEventto be fired.This variant of
addProxyEventInfoallows the names of the methods that add and remove the event listener to be specified, in cases where the names are not simplyadd<listenerClassName>andremove<listenerClassName>.Even though this method can theoretically be applied to fields (in addition to methods), it would be an unusual situation in which that would actually work -- as fields cannot fire events when modified, it would be difficult to have a listener that was always notified when a field value changed.
- Parameters:
memberName- the name of the field or method being proxiedlistenerClass- the type of listener which receives events when the field or method is updatedmodelName- the JavaBeans-style name of the model propertyaddMethod- add method nameremoveMethod- remove method name
-
compileFirstPass
public void compileFirstPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Description copied from interface:TagHandlerPerforms the first pass of compilation on an XML tag from a JAXX source file.TagHandlerimplementations affect the generated.javafile by calling methods in theJAXXCompiler.- Specified by:
compileFirstPassin interfaceTagHandler- Parameters:
tag- the XML tag to compilecompiler- the active JAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
compileSecondPass
public void compileSecondPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Description copied from interface:TagHandlerPerforms the second pass of compilation on an XML tag from a JAXX source file.TagHandlerimplementations affect the generated.javafile by calling methods in theJAXXCompiler.- Specified by:
compileSecondPassin interfaceTagHandler- Parameters:
tag- the XML tag to compilecompiler- the active JAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
getSafeCompiledObject
protected CompiledObject getSafeCompiledObject(Element tag, JAXXCompiler compiler)
-
registerCompiledObject
public void registerCompiledObject(Element tag, JAXXCompiler compiler)
-
createCompiledObject
protected CompiledObject createCompiledObject(String id, JAXXCompiler compiler)
Creates theCompiledObjectwhich will represent the object created by thisTagHandler.- Parameters:
id- theCompiledObject'sID.compiler- compiler to use- Returns:
- the
CompiledObjectto use
-
setDefaults
protected void setDefaults(CompiledObject object, Element tag, JAXXCompiler compiler)
Initializes the default settings of the object, prior to setting its attribute values. The default implementation does nothing.- Parameters:
object- the object to initializetag- the tag being compiledcompiler- the currentJAXXCompiler
-
isPropertyInherited
public boolean isPropertyInherited(String property) throws UnsupportedAttributeException
- Parameters:
property- property name to test- Returns:
trueif the specified property should be inherited by child components when specified via CSS.- Throws:
UnsupportedAttributeException- if attribute is not supported
-
isEventHandlerName
public boolean isEventHandlerName(String name)
- Parameters:
name- name of event- Returns:
trueif the specified name has the form of an event handler attribute (e.g. "onActionPerformed").
-
scanAttributesForDependencies
protected void scanAttributesForDependencies(Element tag, JAXXCompiler compiler)
Scans all attributes for any dependency classes and adds them to the current compilation set. Called bycompileFirstPass()(it is an error to add dependencies after pass 1 is complete).- Parameters:
tag- tag to scancompiler- compiler to use
-
setAttributes
public void setAttributes(CompiledObject object, Element tag, JAXXCompiler compiler)
Processes the attributes of an XML tag. Four kinds of attributes are supported: simple property values (of any datatype supported byconvertFromString(java.lang.String, java.lang.String, java.lang.Class<?>)), data binding expressions (attributes containing curly-brace pairs), event listeners (attributes starting with 'on', such as 'onActionPerformed'), and JAXX-defined properties such as 'id'.- Parameters:
object- the object to be modifiedtag- the tag from which to pull attributescompiler- the currentJAXXCompiler
-
getAttributeComparator
protected Comparator<Attr> getAttributeComparator()
Returns aComparatorwhich defines the ordering in which the tag's attributes should be processed. The default implementation sorts the attributes according to the order defined by thegetAttributeOrdering(org.w3c.dom.Attr)method.- Returns:
- a
Comparatordefining the order of attribute processing
-
getAttributeOrdering
protected int getAttributeOrdering(Attr attr)
Returns the priority with which a particular attribute should be processed. Lower numbers should be processed before higher numbers. This value is used by thegetAttributeComparator()method to define the sort ordering.- Parameters:
attr- the attribute to treate- Returns:
- the attribute's priority
-
setAttributeFromCss
public void setAttributeFromCss(CompiledObject object, String propertyName, String stringValue, JAXXCompiler compiler)
Set a single property on an object. The value may be either a simple value or contain data binding expressions. Simple values are first converted to the property's type usingconvertFromString(String, String, Class).- Parameters:
object- the object on which to set the propertypropertyName- the name of the property to setstringValue- the raw string value of the property from the XMLcompiler- the currentJAXXCompiler
-
setAttribute
public void setAttribute(CompiledObject object, String propertyName, String stringValue, boolean inline, JAXXCompiler compiler)
Set a single property on an object. The value may be either a simple value or contain data binding expressions. Simple values are first converted to the property's type usingconvertFromString(String, String, Class).- Parameters:
object- the object on which to set the propertypropertyName- the name of the property to setstringValue- the raw string value of the property from the XMLinline-trueif the value was directly specified as an inline class tag attribute,falseotherwise (a default value, specified in CSS, etc.)compiler- the currentJAXXCompiler
-
applyStylesheets
public void applyStylesheets(CompiledObject object, JAXXCompiler compiler)
-
addEventHandler
public void addEventHandler(CompiledObject object, String name, String value, JAXXCompiler compiler)
Adds the necessary Java code to aCompiledObjectto add an event listener at runtime.- Parameters:
object- theCompiledObjectto which the event listener should be addedname- the name of the event listener, such as"actionPerformed"value- the Java code snippet to execute when the event is firedcompiler- the currentJAXXCompiler
-
getGetPropertyCode
public String getGetPropertyCode(String javaCode, String name, JAXXCompiler compiler)
Returns a snippet of Java code which will retrieve an object property at runtime. Typically the code is just a call to the property'sgetmethod, but it can be arbitrarily complex.- Parameters:
javaCode- Java code for the object whose property is being retrievedname- the name of the property to retrievecompiler- the currentJAXXCompiler- Returns:
- the snippet
- Throws:
CompilerException- if a compilation error occurs
-
getSetPropertyCode
public String getSetPropertyCode(String javaCode, String name, String valueCode, JAXXCompiler compiler)
Returns a snippet of Java code which will set an object property at runtime. Typically the code is just a call to the property'ssetmethod, but it can be arbitrarily complex.- Parameters:
javaCode- Java code for the object whose property is being setname- the name of the property to setvalueCode- Java expression representing the value to set the property tocompiler- the currentJAXXCompiler- Returns:
- the snippet
- Throws:
CompilerException- if a compilation error occurs
-
setProperty
public void setProperty(CompiledObject object, String name, Object value, JAXXCompiler compiler)
Appends Java code to aCompiledObjectin order to implement a property assignment.setPropertyis invoked in response to most XML attributes (those which are not more complicated cases, like data bindings or event handlers).By the time it reaches this method, the
valuehas already been converted from its XML string representation to the appropriate destination type for the property (i.e. ifJLabel.foregroundis being set,valuewill be aColor).- Parameters:
object- the object being modifiedname- the name of the property to setvalue- the value to set the property tocompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occurs
-
constantValue
protected int constantValue(String key, String value)
Maps string values onto integers, so that int-valued enumeration properties can be specified by strings. For example, when passed a key of 'alignment', this method should normally map the values 'left', 'center', and 'right' onto SwingConstants.LEFT, SwingConstants.CENTER, and SwingConstants.RIGHT respectively.You do not normally need to call this method yourself; it is invoked by
convertFromString(java.lang.String, java.lang.String, java.lang.Class<?>)when an int-valued property has a value which is not a valid number. By default, this method looks at theenumerationValuesvalue of theJAXXPropertyDescriptor.- Parameters:
key- the name of the int-typed propertyvalue- the non-numeric value that was specified for the property- Returns:
- the constant integer value
- Throws:
IllegalArgumentException- if the property is an enumeration, but the value is not validNumberFormatException- if the property is not an enumeration
-
convertFromString
protected Object convertFromString(String key, String value, Class<?> type)
AsTypeManager.convertFromString(String, Class), except that it additionally supports constant names forint-valued types.- Parameters:
key- the name of the property whose value is being convertedvalue- the raw string value of the property as it appears in the XMLtype- the datatype to convert the string into- Returns:
- the converted object
- See Also:
constantValue(java.lang.String, java.lang.String)
-
compileChildrenFirstPass
protected void compileChildrenFirstPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Compiles the child tags of the current tag. The default implementation invokescompileChildTagFirstPass(org.w3c.dom.Element, org.nuiton.jaxx.compiler.JAXXCompiler)for each child tag.- Parameters:
tag- the tag whose children to runcompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
compileChildrenSecondPass
protected void compileChildrenSecondPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Compiles the child tags of the current tag. The default implementation invokescompileChildTagFirstPass(org.w3c.dom.Element, org.nuiton.jaxx.compiler.JAXXCompiler)for each child tag.- Parameters:
tag- the tag whose children to runcompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
compileChildTagFirstPass
protected void compileChildTagFirstPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Compiles a child of the current tag. The default implementation callsJAXXCompiler.compileFirstPass.- Parameters:
tag- the child tag to runcompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
compileChildTagSecondPass
protected void compileChildTagSecondPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Compiles a child of the current tag. The default implementation callsJAXXCompiler.compileSecondPass.- Parameters:
tag- the child tag to runcompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
safeInit
protected void safeInit()
-
-