public interface DomElement extends AnnotatedElement, UserDataHolder
Modifier and Type | Field and Description |
---|---|
static DomElement[] |
EMPTY_ARRAY |
getAnnotation
getUserData, putUserData
static final DomElement[] EMPTY_ARRAY
XmlTag getXmlTag()
XmlElement getXmlElement()
XmlFile
, XmlTag
or XmlAttribute
DomElement getParent()
XmlTag ensureTagExists()
XmlElement ensureXmlElementExists()
void undefine()
boolean isValid()
boolean exists()
DomGenericInfo getGenericInfo()
java.lang.String getXmlElementName()
java.lang.String getXmlElementNamespace()
java.lang.String getXmlElementNamespaceKey()
Namespace
, or null otherwise, which means that namespace should be equal
to that of the element's parentvoid accept(DomElementVisitor visitor)
void acceptChildren(DomElementVisitor visitor)
DomManager getManager()
java.lang.reflect.Type getDomElementType()
AbstractDomChildrenDescription getChildDescription()
DomNameStrategy getNameStrategy()
ElementPresentation getPresentation()
GlobalSearchScope getResolveScope()
<T extends DomElement> T getParentOfType(java.lang.Class<T> requiredClass, boolean strict)
requiredClass
- parent element's typestrict
- Module getModule()
void copyFrom(DomElement other)
<T extends DomElement> T createMockCopy(boolean physical)
<T extends DomElement> T createStableCopy()
DomManager.createStableValue(com.intellij.openapi.util.Factory)
}),
that holds the complete 'XPath' to this element in XML. If this element is in collection, and something
is inserted before it, the stable copy behaviour may be unexpected. So use this method only when you
are sure that nothing serious will happen during the lifetime of the stable copy. The most usual use
case is when one creates something inside WriteCommandAction
and
wants to use it outside the action. Due to formatting done on the command finish the element may become
invalidated, but the stable copy will survive, because nothing in fact has changed in its 'XPath'.