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, setUserMap
finalize, getClass, notify, notifyAll, wait, wait, wait
getUserData, putUserData
public 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 DomElement
protected final void assertValid()
public DomStub getStub()
public final java.lang.reflect.Type getDomElementType()
getDomElementType
in interface DomElement
protected java.lang.String getValue()
protected void setValue(java.lang.String value)
public void copyFrom(DomElement other)
copyFrom
in interface DomElement
public <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'.protected DomElement createPathStableCopy()
public final <T extends DomElement> T createMockCopy(boolean physical)
createMockCopy
in interface DomElement
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 Module getModule()
getModule
in interface DomElement
public XmlTag ensureTagExists()
ensureTagExists
in interface DomElement
public XmlElement getXmlElement()
DomElement
getXmlElement
in interface DomElement
XmlFile
, XmlTag
or XmlAttribute
public boolean exists()
exists
in interface DomElement
public XmlElement ensureXmlElementExists()
ensureXmlElementExists
in interface DomElement
protected final XmlTag createChildTag(EvaluatedXmlName tagName)
public final boolean isValid()
isValid
in interface DomElement
protected java.lang.String checkValidity()
public final DomGenericInfoEx getGenericInfo()
getGenericInfo
in interface DomElement
protected abstract void undefineInternal()
public final void undefine()
DomElement
undefine
in interface DomElement
protected 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 DomElement
public final EvaluatedXmlName getXmlName()
public void accept(DomElementVisitor visitor)
accept
in interface DomElement
public void acceptChildren(DomElementVisitor visitor)
acceptChildren
in interface DomElement
protected final Converter getScalarConverter()
public AbstractDomChildDescriptionImpl getChildDescription()
getChildDescription
in interface DomElement
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
getAnnotation
in interface AnnotatedElement
protected <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 DomElement
protected boolean isAttribute()
public ElementPresentation getPresentation()
getPresentation
in interface DomElement
public final GlobalSearchScope getResolveScope()
getResolveScope
in interface DomElement
public final <T extends DomElement> T getParentOfType(java.lang.Class<T> requiredClass, boolean strict)
DomElement
getParentOfType
in interface DomElement
requiredClass
- 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.Throwable
public final java.lang.String toString()
toString
in class java.lang.Object
public final java.lang.Class<?> getRawType()
public XmlTag getXmlTag()
getXmlTag
in interface DomElement
protected XmlElement recomputeXmlElement(DomInvocationHandler parentHandler)
protected final void detach()
protected final void setXmlElement(XmlElement element)
public final DomManagerImpl getManager()
getManager
in interface DomElement
public final DomElement addCollectionChild(CollectionChildDescriptionImpl description, java.lang.reflect.Type type, int index) throws IncorrectOperationException
IncorrectOperationException
protected 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.Object
public int hashCode()
hashCode
in class java.lang.Object