public abstract class DomInvocationHandler extends UserDataHolderBase implements DomElement
| Modifier and Type | Field and Description |
|---|---|
static java.lang.reflect.Method |
ACCEPT_CHILDREN_METHOD |
static java.lang.reflect.Method |
ACCEPT_METHOD |
protected DomStub |
myStub |
EMPTY_ARRAY| Modifier | Constructor and Description |
|---|---|
protected |
DomInvocationHandler(java.lang.reflect.Type type,
DomParentStrategy parentStrategy,
EvaluatedXmlName tagName,
AbstractDomChildDescriptionImpl childDescription,
DomManagerImpl manager,
boolean dynamic,
DomStub stub) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(DomElementVisitor visitor) |
void |
acceptChildren(DomElementVisitor visitor) |
DomElement |
addCollectionChild(CollectionChildDescriptionImpl description,
java.lang.reflect.Type type,
int index) |
protected void |
addRequiredChildren() |
protected void |
assertValid() |
protected java.lang.String |
checkValidity() |
void |
copyFrom(DomElement other) |
protected XmlTag |
createChildTag(EvaluatedXmlName tagName) |
EvaluatedXmlName |
createEvaluatedXmlName(XmlName xmlName) |
protected void |
createFixedChildrenTags(EvaluatedXmlName tagName,
FixedChildDescriptionImpl description,
int count) |
<T extends DomElement> |
createMockCopy(boolean physical) |
protected DomElement |
createPathStableCopy() |
<T extends DomElement> |
createStableCopy() |
protected void |
deleteTag(XmlTag tag) |
protected void |
detach() |
XmlTag |
ensureTagExists() |
XmlElement |
ensureXmlElementExists() |
boolean |
equals(java.lang.Object o) |
boolean |
exists() |
protected void |
fireUndefinedEvent() |
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationClass) |
AbstractDomChildDescriptionImpl |
getChildDescription() |
protected <T extends java.lang.annotation.Annotation> |
getClassAnnotation(java.lang.Class<T> annotationClass) |
java.util.List<? extends DomElement> |
getCollectionChildren(AbstractCollectionChildDescription description) |
java.util.List<? extends DomElement> |
getCollectionChildren(AbstractCollectionChildDescription description,
boolean processIncludes) |
java.lang.reflect.Type |
getDomElementType() |
XmlFile |
getFile() |
DomGenericInfoEx |
getGenericInfo() |
DomManagerImpl |
getManager() |
Module |
getModule() |
DomNameStrategy |
getNameStrategy() |
DomElement |
getParent() |
<T extends DomElement> |
getParentOfType(java.lang.Class<T> requiredClass,
boolean strict)
Walk up the DOM tree searching for element of requiredClass type
|
ElementPresentation |
getPresentation() |
DomElement |
getProxy() |
java.lang.Class<?> |
getRawType() |
GlobalSearchScope |
getResolveScope() |
protected Converter |
getScalarConverter() |
DomStub |
getStub() |
protected java.lang.String |
getValue() |
XmlElement |
getXmlElement()
Returns the underlying XML element/file.
|
java.lang.String |
getXmlElementName() |
java.lang.String |
getXmlElementNamespace() |
java.lang.String |
getXmlElementNamespaceKey() |
EvaluatedXmlName |
getXmlName() |
XmlTag |
getXmlTag() |
int |
hashCode() |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
protected boolean |
isAttribute() |
boolean |
isValid() |
protected java.lang.reflect.Type |
narrowType(java.lang.reflect.Type nominalType) |
protected XmlElement |
recomputeXmlElement(DomInvocationHandler parentHandler) |
protected abstract XmlTag |
setEmptyXmlTag() |
protected void |
setValue(java.lang.String value) |
protected void |
setXmlElement(XmlElement element) |
java.lang.String |
toString() |
void |
undefine()
Removes all corresponding XML content.
|
protected abstract void |
undefineInternal() |
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMapfinalize, getClass, notify, notifyAll, wait, wait, waitgetUserData, putUserDatapublic static final java.lang.reflect.Method ACCEPT_METHOD
public static final java.lang.reflect.Method ACCEPT_CHILDREN_METHOD
protected DomStub myStub
protected DomInvocationHandler(java.lang.reflect.Type type,
DomParentStrategy parentStrategy,
EvaluatedXmlName tagName,
AbstractDomChildDescriptionImpl childDescription,
DomManagerImpl manager,
boolean dynamic,
DomStub stub)
protected java.lang.reflect.Type narrowType(java.lang.reflect.Type nominalType)
public DomElement getParent()
getParent in interface DomElementprotected final void assertValid()
public DomStub getStub()
public final java.lang.reflect.Type getDomElementType()
getDomElementType in interface DomElementprotected java.lang.String getValue()
protected void setValue(java.lang.String value)
public void copyFrom(DomElement other)
copyFrom in interface DomElementpublic <T extends DomElement> T createStableCopy()
createStableCopy in interface DomElementDomManager.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'.protected DomElement createPathStableCopy()
public final <T extends DomElement> T createMockCopy(boolean physical)
createMockCopy in interface DomElementpublic java.lang.String getXmlElementNamespace()
getXmlElementNamespace in interface DomElementpublic java.lang.String getXmlElementNamespaceKey()
getXmlElementNamespaceKey in interface DomElementNamespace, or null otherwise, which means that namespace should be equal
to that of the element's parentpublic final Module getModule()
getModule in interface DomElementpublic XmlTag ensureTagExists()
ensureTagExists in interface DomElementpublic XmlElement getXmlElement()
DomElementgetXmlElement in interface DomElementXmlFile, XmlTag or XmlAttributepublic boolean exists()
exists in interface DomElementpublic XmlElement ensureXmlElementExists()
ensureXmlElementExists in interface DomElementprotected final XmlTag createChildTag(EvaluatedXmlName tagName)
public final boolean isValid()
isValid in interface DomElementprotected java.lang.String checkValidity()
public final DomGenericInfoEx getGenericInfo()
getGenericInfo in interface DomElementprotected abstract void undefineInternal()
public final void undefine()
DomElementundefine in interface DomElementprotected final void deleteTag(XmlTag tag)
protected final void fireUndefinedEvent()
protected abstract XmlTag setEmptyXmlTag()
protected void addRequiredChildren()
public final java.lang.String getXmlElementName()
getXmlElementName in interface DomElementpublic final EvaluatedXmlName getXmlName()
public void accept(DomElementVisitor visitor)
accept in interface DomElementpublic void acceptChildren(DomElementVisitor visitor)
acceptChildren in interface DomElementprotected final Converter getScalarConverter()
public AbstractDomChildDescriptionImpl getChildDescription()
getChildDescription in interface DomElementpublic <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
getAnnotation in interface AnnotatedElementprotected <T extends java.lang.annotation.Annotation> T getClassAnnotation(java.lang.Class<T> annotationClass)
public final DomElement getProxy()
public final XmlFile getFile()
public DomNameStrategy getNameStrategy()
getNameStrategy in interface DomElementprotected boolean isAttribute()
public ElementPresentation getPresentation()
getPresentation in interface DomElementpublic final GlobalSearchScope getResolveScope()
getResolveScope in interface DomElementpublic final <T extends DomElement> T getParentOfType(java.lang.Class<T> requiredClass, boolean strict)
DomElementgetParentOfType in interface DomElementrequiredClass - parent element's typestrict - public final java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
java.lang.Throwablepublic final java.lang.String toString()
toString in class java.lang.Objectpublic final java.lang.Class<?> getRawType()
public XmlTag getXmlTag()
getXmlTag in interface DomElementprotected XmlElement recomputeXmlElement(DomInvocationHandler parentHandler)
protected final void detach()
protected final void setXmlElement(XmlElement element)
public final DomManagerImpl getManager()
getManager in interface DomElementpublic final DomElement addCollectionChild(CollectionChildDescriptionImpl description, java.lang.reflect.Type type, int index) throws IncorrectOperationException
IncorrectOperationExceptionprotected final void createFixedChildrenTags(EvaluatedXmlName tagName, FixedChildDescriptionImpl description, int count)
public final EvaluatedXmlName createEvaluatedXmlName(XmlName xmlName)
public java.util.List<? extends DomElement> getCollectionChildren(AbstractCollectionChildDescription description)
public java.util.List<? extends DomElement> getCollectionChildren(AbstractCollectionChildDescription description, boolean processIncludes)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object