|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gxp.compiler.base.AbstractNode
com.google.gxp.compiler.parser.ParsedElement
public abstract class ParsedElement
Represents an XML element in the parse tree.
| Constructor Summary | |
|---|---|
protected |
ParsedElement(SourcePosition sourcePosition,
String displayName,
List<ParsedAttribute> attrs,
List<? extends ParsedElement> children)
|
| Method Summary | ||
|---|---|---|
abstract
|
acceptVisitor(ParsedElementVisitor<T> visitor)
Accepts the specified ParsedElementVisitor and returns the result
of the visit. |
|
boolean |
canBeRoot()
Indicates if the element is allowed to be the root element of a GXP document. |
|
List<ParsedAttribute> |
getAttributes()
|
|
List<ParsedElement> |
getChildren()
|
|
ParsedElement |
withChildren(List<ParsedElement> newChildren)
This incomplete implementation checks to see if the chidren are the same as this ParsedElement's children, and if so returns this. |
|
protected abstract ParsedElement |
withChildrenImpl(List<ParsedElement> children)
Underlying implementation for the slow path of the withChildren
method. |
|
| Methods inherited from class com.google.gxp.compiler.base.AbstractNode |
|---|
abstractNodeHashCode, equalsAbstractNode, getDisplayName, getSourcePosition |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ParsedElement(SourcePosition sourcePosition,
String displayName,
List<ParsedAttribute> attrs,
List<? extends ParsedElement> children)
| Method Detail |
|---|
public List<ParsedAttribute> getAttributes()
public List<ParsedElement> getChildren()
public boolean canBeRoot()
public abstract <T> T acceptVisitor(ParsedElementVisitor<T> visitor)
ParsedElementVisitor and returns the result
of the visit.
public final ParsedElement withChildren(List<ParsedElement> newChildren)
This incomplete implementation checks to see if the chidren are the
same as this ParsedElement's children, and if so returns this.
Otherwise it delegates to the withChildrenImpl method.
protected abstract ParsedElement withChildrenImpl(List<ParsedElement> children)
withChildren
method. Subclasses should override this so that it creates a new ParsedElement that's identical to themselves except for having the
specified children.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||