Class ElementDeclaration
- java.lang.Object
-
- org.eclipse.lemminx.extensions.generators.ContainerDeclaration
-
- org.eclipse.lemminx.extensions.generators.ElementDeclaration
-
public class ElementDeclaration extends ContainerDeclaration
Element information.
-
-
Constructor Summary
Constructors Constructor Description ElementDeclaration(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildHierarchy(List<String> tags)voidaddElement(ElementDeclaration element)AttributeDeclarationgetAttribute(String name)Returns the attribute information for the given name and create it if not found.Collection<AttributeDeclaration>getAttributes()ChildrenPropertiesgetChildrenProperties()StringgetName()Returns the element name.intgetOccurrences()Returns the occurrences of DOM element.ElementDeclarationgetParent()booleanhasAttributeId()Returns true if the element have an attribute ID and false otherwise.booleanhasCharacterContent()Returns true if element has character content and false otherwise.voidincrementOccurrences()Increment the DOM element occurrence.-
Methods inherited from class org.eclipse.lemminx.extensions.generators.ContainerDeclaration
getElement, getElements
-
-
-
-
Constructor Detail
-
ElementDeclaration
public ElementDeclaration(String name)
-
-
Method Detail
-
getName
public String getName()
Returns the element name.- Returns:
- the element name.
-
getAttribute
public AttributeDeclaration getAttribute(String name)
Returns the attribute information for the given name and create it if not found.- Parameters:
name- the attribute name- Returns:
- the attribute information for the given name and create it if not found.
-
getAttributes
public Collection<AttributeDeclaration> getAttributes()
-
hasCharacterContent
public boolean hasCharacterContent()
Returns true if element has character content and false otherwise.- Returns:
- true if element has character content and false otherwise.
-
addElement
public void addElement(ElementDeclaration element)
- Overrides:
addElementin classContainerDeclaration
-
getParent
public ElementDeclaration getParent()
-
getChildrenProperties
public ChildrenProperties getChildrenProperties()
-
incrementOccurrences
public void incrementOccurrences()
Increment the DOM element occurrence.
-
getOccurrences
public int getOccurrences()
Returns the occurrences of DOM element.- Returns:
- the occurrences of DOM element.
-
hasAttributeId
public boolean hasAttributeId()
Returns true if the element have an attribute ID and false otherwise.- Returns:
- true if the element have an attribute ID and false otherwise.
-
-