public class DomFileElementImpl<T extends DomElement> extends java.lang.Object implements DomFileElement<T>, SemElement
EMPTY_ARRAY
EVER_CHANGED, NEVER_CHANGED
Modifier | Constructor and Description |
---|---|
protected |
DomFileElementImpl(XmlFile file,
EvaluatedXmlNameImpl rootTagName,
DomFileDescription<T> fileDescription,
FileStub stub) |
protected DomFileElementImpl(XmlFile file, EvaluatedXmlNameImpl rootTagName, DomFileDescription<T> fileDescription, FileStub stub)
public final XmlFile getFile()
getFile
in interface DomFileElement<T extends DomElement>
public XmlFile getOriginalFile()
getOriginalFile
in interface DomFileElement<T extends DomElement>
public XmlTag getRootTag()
getRootTag
in interface DomFileElement<T extends DomElement>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public final DomManagerImpl getManager()
getManager
in interface DomElement
public final java.lang.reflect.Type getDomElementType()
getDomElementType
in interface DomElement
public AbstractDomChildrenDescription getChildDescription()
getChildDescription
in interface DomElement
public DomNameStrategy getNameStrategy()
getNameStrategy
in interface DomElement
public ElementPresentation getPresentation()
getPresentation
in interface DomElement
public GlobalSearchScope getResolveScope()
getResolveScope
in interface DomElement
public <T extends DomElement> T getParentOfType(java.lang.Class<T> requiredClass, boolean strict)
DomElement
getParentOfType
in interface DomElement
requiredClass
- parent element's typestrict
- public Module getModule()
getModule
in interface DomElement
public void copyFrom(DomElement other)
copyFrom
in interface DomElement
public final <T extends DomElement> T createMockCopy(boolean physical)
createMockCopy
in interface DomElement
public final <T extends DomElement> T createStableCopy()
createStableCopy
in interface DomElement
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'.public java.lang.String getXmlElementNamespace()
getXmlElementNamespace
in interface DomElement
public java.lang.String getXmlElementNamespaceKey()
getXmlElementNamespaceKey
in interface DomElement
Namespace
, or null otherwise, which means that namespace should be equal
to that of the element's parentpublic final T getRootElement()
getRootElement
in interface DomFileElement<T extends DomElement>
public java.lang.Class<T> getRootElementClass()
getRootElementClass
in interface DomFileElement<T extends DomElement>
public DomFileDescription<T> getFileDescription()
getFileDescription
in interface DomFileElement<T extends DomElement>
protected final DomRootInvocationHandler getRootHandler()
public java.lang.String toString()
toString
in class java.lang.Object
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
getAnnotation
in interface AnnotatedElement
public final XmlTag getXmlTag()
getXmlTag
in interface DomElement
public <T extends DomElement> DomFileElementImpl<T> getRoot()
public DomElement getParent()
getParent
in interface DomElement
public final XmlTag ensureTagExists()
ensureTagExists
in interface DomElement
public final XmlElement getXmlElement()
DomElement
getXmlElement
in interface DomElement
XmlFile
, XmlTag
or XmlAttribute
public final XmlElement ensureXmlElementExists()
ensureXmlElementExists
in interface DomElement
public void undefine()
DomElement
undefine
in interface DomElement
public final boolean isValid()
isValid
in interface DomElement
public boolean exists()
exists
in interface DomElement
public java.lang.String checkValidity()
public final DomGenericInfo getGenericInfo()
getGenericInfo
in interface DomElement
public java.lang.String getXmlElementName()
getXmlElementName
in interface DomElement
public void accept(DomElementVisitor visitor)
accept
in interface DomElement
public void acceptChildren(DomElementVisitor visitor)
acceptChildren
in interface DomElement
public <T> T getUserData(Key<T> key)
getUserData
in interface UserDataHolder
public <T> void putUserData(Key<T> key, T value)
UserDataHolder
putUserData
in interface UserDataHolder
public final long getModificationCount()
getModificationCount
in interface ModificationTracker