| java.lang.Object org.openlaszlo.compiler.NodeModel
NodeModel | public class NodeModel implements Cloneable(Code) | | Models a runtime LzNode.
|
Inner Class :static class CompiledAttribute | |
Method Summary | |
void | addAttribute(CompiledAttribute cattr, String name, ComparisonMap attrs, ComparisonMap events, ComparisonMap references, ComparisonMap paths, ComparisonMap styles) | void | addAttributeElement(Element element) | void | addAttributes(CompilationEnvironment env) | void | addChildren(CompilationEnvironment env) | void | addEventElement(Element element) | void | addHandlerElement(Element element) Defines an event handler. | void | addHandlerFromAttribute(Element element, String event, String body) | void | addLiteralDataElement(Element element) | void | addMethodElement(Element element) | void | addPropertyElement(Element element) | void | addText() | public String | asJavascript() Returns a script that creates a runtime representation of a
model. | Map | asMap() | void | checkChildNameConflict(String parentName, Element child, CompilationEnvironment env) Warn if named child tag conflicts with a declared attribute in the parent class. | int | classSubnodes() | public Object | clone() | CompiledAttribute | compileAttribute(Element source, String name, String value, Schema.Type type, String when) | public static NodeModel | elementAsModel(Element elt, ViewSchema schema, CompilationEnvironment env) | public static NodeModel | elementOnlyAsModel(Element elt, ViewSchema schema, CompilationEnvironment env) | NodeModel | expandClassDefinitions() Expand eligible instances by replacing the instance by the
merge of its class definition with the instance content
(attributes and children). | ViewSchema.Type | getAttributeTypeInfoFromParent(Element elt, String attrname) | ViewSchema.Type | getAttributeTypeInfoFromSuperclass(Element classDefElement, String attrname) | String | getAttributeValueDefault(String attribute, String name, String defaultValue) | List | getChildren() | ClassModel | getClassModel() | static String | getDatasetContent(Element element, CompilationEnvironment env) | static String | getDatasetContent(Element element, CompilationEnvironment env, boolean trimwhitespace) | String | getMessageName() Returns a name that is used to report this element in warning
messages. | ClassModel | getParentClassModel() Gets the ClassModel for this element's parent class. | boolean | hasAttribute(String name) | boolean | isDatapathElement(Element child) | public static boolean | isPropertyElement(Element elt) | void | removeAttribute(String name) | static void | removeNamespaces(Element elt) | void | setAttribute(String name, Object value) | void | setClassName(String name) | public String | toString() | boolean | topLevelDeclaration() | int | totalSubnodes() | static void | trimWhitespace(Content elt) | void | updateAttrs() | void | updateMembers(NodeModel source) Replace members of this with like-named members of source. |
FONTSTYLE_ATTRIBUTE | final public static String FONTSTYLE_ATTRIBUTE(Code) | | |
WHEN_IMMEDIATELY | final public static String WHEN_IMMEDIATELY(Code) | | |
delegateList | protected List delegateList(Code) | | [eventName: String, methodName: String, Function]
|
delegates | protected ComparisonMap delegates(Code) | | A set {eventName: String -> True) of names of event handlers
declared with .
|
element | final protected Element element(Code) | | |
totalSubnodes | protected int totalSubnodes(Code) | | |
addAttributeElement | void addAttributeElement(Element element)(Code) | | |
addEventElement | void addEventElement(Element element)(Code) | | |
addHandlerElement | void addHandlerElement(Element element)(Code) | | Defines an event handler.
[function body]
This can do a compile time check to see if eventname is declared or
if there is an attribute FOO such that name="onFOO".
|
addHandlerFromAttribute | void addHandlerFromAttribute(Element element, String event, String body)(Code) | | |
addLiteralDataElement | void addLiteralDataElement(Element element)(Code) | | |
addMethodElement | void addMethodElement(Element element)(Code) | | |
addPropertyElement | void addPropertyElement(Element element)(Code) | | |
asJavascript | public String asJavascript()(Code) | | Returns a script that creates a runtime representation of a
model. The format of this representation is specified here.
|
checkChildNameConflict | void checkChildNameConflict(String parentName, Element child, CompilationEnvironment env)(Code) | | Warn if named child tag conflicts with a declared attribute in the parent class.
|
classSubnodes | int classSubnodes()(Code) | | |
elementAsModel | public static NodeModel elementAsModel(Element elt, ViewSchema schema, CompilationEnvironment env)(Code) | | Returns a NodeModel that represents an Element, including the
element's children
Parameters: elt - an element Parameters: schema - a schema, used to encode attribute values Parameters: env - the CompilationEnvironment |
elementOnlyAsModel | public static NodeModel elementOnlyAsModel(Element elt, ViewSchema schema, CompilationEnvironment env)(Code) | | Returns a NodeModel that represents an Element, excluding the
element's children
Parameters: elt - an element Parameters: schema - a schema, used to encode attribute values Parameters: env - the CompilationEnvironment |
expandClassDefinitions | NodeModel expandClassDefinitions()(Code) | | Expand eligible instances by replacing the instance by the
merge of its class definition with the instance content
(attributes and children). An eligible instance is an instance
of a compile-time class, that doesn't contain any merge
stoppers. If the class and the instance contain a member with
the same name, this is a merge stopper. In the future, this
restriction may be relaxed, but will probably always include
the case where a class and instance have a member with the same
name and the instance name calls a superclass method.
|
getMessageName | String getMessageName()(Code) | | Returns a name that is used to report this element in warning
messages.
|
getParentClassModel | ClassModel getParentClassModel()(Code) | | Gets the ClassModel for this element's parent class. If this
element is a definition, the superclass; otherwise the
class of the tag of this element.
|
isDatapathElement | boolean isDatapathElement(Element child)(Code) | | |
isPropertyElement | public static boolean isPropertyElement(Element elt)(Code) | | |
removeNamespaces | static void removeNamespaces(Element elt)(Code) | | |
topLevelDeclaration | boolean topLevelDeclaration()(Code) | | Is this element a direct child of the canvas?
|
totalSubnodes | int totalSubnodes()(Code) | | |
trimWhitespace | static void trimWhitespace(Content elt)(Code) | | |
updateAttrs | void updateAttrs()(Code) | | |
updateMembers | void updateMembers(NodeModel source)(Code) | | Replace members of this with like-named members of source.
|
|
|