|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jicengine.element.ElementCompiler
A class that makes it possible to create Element-objects little by little, as is needed if the JIC-file is parsed with a SAX-parser.
ElementCompiler parses String-typed attributes and other data to corresponding
objects. After all the data of an XML-element has been processed, the resulting
runtime-Element can be obtained with method createElement()
.
Constructor Summary | |
ElementCompiler(java.lang.String name,
Location location)
|
Method Summary | |
Element |
createElement()
|
void |
elementInitialized()
Called by handler when the start-tag of the element has been processed - Element has been created and all attributes have been set, but no cdata nor child-elements have been processed. |
Operation |
getConstructor()
|
protected ElementImpl |
getElement()
|
Location |
getLocation()
|
java.lang.String |
getName()
|
void |
handleChildElement(Element child)
Used for notifying this element about a child-element |
protected abstract ActionElement |
handleExtraChildElement(ValueElement child)
for subclasses! |
void |
setAction(java.lang.String expression)
for setting the action as an expression. |
void |
setCData(java.lang.String cData)
if this element has a constructor, the cdata is added to the element-context with the name 'CDATA'. |
void |
setConstructor(java.lang.String expression)
|
void |
setId(java.lang.String id)
Sets the id of this element. |
void |
setInstanceClass(java.lang.String className)
|
void |
setOverridableBy(java.lang.String overridingId)
|
void |
setParameters(java.lang.String parameters)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ElementCompiler(java.lang.String name, Location location)
Method Detail |
protected ElementImpl getElement()
public java.lang.String getName()
public Location getLocation()
public void setOverridableBy(java.lang.String overridingId)
public Element createElement() throws ElementException
ElementException
public void setId(java.lang.String id)
id
- The new id valuepublic void setParameters(java.lang.String parameters)
public void setConstructor(java.lang.String expression) throws ElementException
ElementException
public Operation getConstructor()
public void setInstanceClass(java.lang.String className) throws ElementException
ElementException
public void setAction(java.lang.String expression) throws ElementException
for setting the action as an expression.
enhancements:
setMethod(value)
and
add(component)
are automatically madded to expressions
PARENT.setMethod(value)
and
PARENT.add(component)
.
ElementException
public void setCData(java.lang.String cData) throws ElementException
cData
- Description of the Parameter
ElementException
- Description of the Exceptionpublic void handleChildElement(Element child) throws ElementException
child
- a child with no action, can have a value or not.
ElementException
- Description of the Exceptionprotected abstract ActionElement handleExtraChildElement(ValueElement child) throws ElementException
ElementException
public void elementInitialized() throws ElementException
ElementException
- Description of the Exceptionpublic java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |