|
|
|
|
org.eclipse.jet.core.parser.ast
Class XMLElement
java.lang.Object
org.eclipse.jet.core.parser.ast.JETASTElement
org.eclipse.jet.core.parser.ast.BodyElement
org.eclipse.jet.core.parser.ast.XMLElement
-
Direct Known Subclasses:
-
XMLBodyElement,
XMLEmptyElement
-
public abstract class XMLElement
- extends
BodyElement
An abstract implementation representing all XML-based elements in the JET AST
This class is not intended to be subclassed by clients
-
Since:
- 0.8.0
Method Summary
|
java.util.Map
|
getAttributes
()
Return a read-only map of the attributes (name to value map) |
java.lang.String
|
getName
()
Return the QName of the element |
java.lang.String
|
getNSPrefix
()
Return the XML Namespace prefixe of the element |
TagDefinition
|
getTagDefinition
()
|
java.lang.String
|
getTagNCName
()
Return the NCName (unqualified name) of the element. |
boolean
|
removeLineWhenOtherwiseEmpty
()
Indicate whether the the surrounding whitespace, including the trailing
new line should be removed from the template output. |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
getName
public final java.lang.String getName()
- Return the QName of the element
-
-
Returns:
- a string
getAttributes
public final java.util.Map getAttributes()
- Return a read-only map of the attributes (name to value map)
-
-
Returns:
- a Map with String keys (attribute name) and String values
getTagNCName
public java.lang.String getTagNCName()
- Return the NCName (unqualified name) of the element.
-
-
Returns:
- the name with any XML namespace prefix (prefix:) removed
getNSPrefix
public java.lang.String getNSPrefix()
- Return the XML Namespace prefixe of the element
-
-
Returns:
- the namespace prefix or the empty string if there is no namespace
prefix.
getTagDefinition
public final
TagDefinition getTagDefinition()
-
-
Returns:
- Returns the td.
removeLineWhenOtherwiseEmpty
public final boolean removeLineWhenOtherwiseEmpty()
-
Description copied from class:
JETASTElement
- Indicate whether the the surrounding whitespace, including the trailing
new line should be removed from the template output. In general, elements
that create output should return
false , while element
that do should should return true .
-
-
Specified by:
-
removeLineWhenOtherwiseEmpty
in class
JETASTElement
-
-
Returns:
-
true if the containing line should be removed if
otherwise empty.
|
|
|