public class DomUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.reflect.TypeVariable<java.lang.Class<GenericValue>> |
GENERIC_VALUE_TYPE_VARIABLE |
Constructor and Description |
---|
DomUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
acceptAvailableChildren(DomElement element,
DomElementVisitor visitor) |
static <T extends DomElement> |
addElementAfter(T anchor) |
static java.lang.Class |
extractParameterClassFromGenericType(java.lang.reflect.Type type) |
static <T extends DomElement> |
findByName(java.util.Collection<T> list,
java.lang.String name) |
static <T extends DomElement> |
findDomElement(PsiElement element,
java.lang.Class<T> beanClass) |
static <T extends DomElement> |
findDomElement(PsiElement element,
java.lang.Class<T> beanClass,
boolean strict) |
static DomElement |
findDuplicateNamedValue(DomElement element,
java.lang.String newName) |
static java.util.Collection<java.lang.Class<?>> |
getAllInterfaces(java.lang.Class<?> aClass,
java.util.Collection<java.lang.Class<?>> result) |
static <T extends DomElement> |
getChildrenOf(DomElement parent,
java.lang.Class<T> type) |
static <T> java.util.List<T> |
getChildrenOfType(DomElement parent,
java.lang.Class<T> type) |
static DomElement |
getContextElement(Editor editor) |
static <T> T |
getContextElement(Editor editor,
java.lang.Class<T> clazz) |
static java.util.List<DomElement> |
getDefinedChildren(DomElement parent,
boolean tags,
boolean attributes) |
static <T> java.util.List<T> |
getDefinedChildrenOfType(DomElement parent,
java.lang.Class<T> type) |
static <T> java.util.List<T> |
getDefinedChildrenOfType(DomElement parent,
java.lang.Class<T> type,
boolean tags,
boolean attributes) |
static DomElement |
getDomElement(Editor editor,
PsiFile file) |
static DomElement |
getDomElement(PsiElement element) |
static java.lang.String [] |
getElementNames(java.util.Collection<? extends DomElement> list) |
static java.util.List<XmlTag> |
getElementTags(java.util.Collection<? extends DomElement> list) |
static XmlTag [] |
getElementTags(DomElement [] list) |
static XmlFile |
getFile(DomElement element) |
static <T extends DomElement> |
getFileElement(DomElement element) |
static java.util.List<JavaMethod> |
getFixedPath(DomElement element) |
static java.lang.Class |
getGenericValueParameter(java.lang.reflect.Type type) |
static java.util.List<? extends DomElement> |
getIdentitySiblings(DomElement element) |
static <T extends DomElement> |
getOriginalElement(T domElement) |
static <T> T |
getParentOfType(DomElement element,
java.lang.Class<T> requiredClass,
boolean strict) |
static Pair<TextRange,PsiElement> |
getProblemRange(XmlTag tag) |
static DomElement |
getRoot(DomElement domElement) |
static XmlElement |
getValueElement(GenericDomValue domValue) |
static boolean |
hasXml(DomElement element) |
static boolean |
isAncestor(DomElement ancestor,
DomElement descendant,
boolean strict) |
static boolean |
isGenericValueType(java.lang.reflect.Type type) |
static java.lang.Class<?> |
substituteGenericType(java.lang.reflect.Type genericType,
java.lang.reflect.Type classType) |
public static final java.lang.reflect.TypeVariable<java.lang.Class<GenericValue>> GENERIC_VALUE_TYPE_VARIABLE
public static java.lang.Class extractParameterClassFromGenericType(java.lang.reflect.Type type)
public static boolean isGenericValueType(java.lang.reflect.Type type)
public static <T extends DomElement> T findByName(java.util.Collection<T> list, java.lang.String name)
public static java.lang.String [] getElementNames(java.util.Collection<? extends DomElement> list)
public static java.util.List<XmlTag> getElementTags(java.util.Collection<? extends DomElement> list)
public static XmlTag [] getElementTags(DomElement [] list)
public static java.util.List<JavaMethod> getFixedPath(DomElement element)
public static java.lang.Class<?> substituteGenericType(java.lang.reflect.Type genericType, java.lang.reflect.Type classType)
public static java.lang.Class getGenericValueParameter(java.lang.reflect.Type type)
public static XmlElement getValueElement(GenericDomValue domValue)
public static java.util.List<? extends DomElement> getIdentitySiblings(DomElement element)
public static <T> java.util.List<T> getChildrenOfType(DomElement parent, java.lang.Class<T> type)
public static java.util.List<DomElement> getDefinedChildren(DomElement parent, boolean tags, boolean attributes)
public static <T> java.util.List<T> getDefinedChildrenOfType(DomElement parent, java.lang.Class<T> type, boolean tags, boolean attributes)
public static <T> java.util.List<T> getDefinedChildrenOfType(DomElement parent, java.lang.Class<T> type)
public static DomElement findDuplicateNamedValue(DomElement element, java.lang.String newName)
public static boolean isAncestor(DomElement ancestor, DomElement descendant, boolean strict)
public static void acceptAvailableChildren(DomElement element, DomElementVisitor visitor)
public static java.util.Collection<java.lang.Class<?>> getAllInterfaces(java.lang.Class<?> aClass, java.util.Collection<java.lang.Class<?>> result)
public static <T> T getParentOfType(DomElement element, java.lang.Class<T> requiredClass, boolean strict)
public static <T> T getContextElement(Editor editor, java.lang.Class<T> clazz)
public static DomElement getContextElement(Editor editor)
public static DomElement getDomElement(Editor editor, PsiFile file)
public static DomElement getDomElement(PsiElement element)
public static <T extends DomElement> T getOriginalElement(T domElement)
public static <T extends DomElement> T addElementAfter(T anchor)
public static <T extends DomElement> T findDomElement(PsiElement element, java.lang.Class<T> beanClass)
public static <T extends DomElement> T findDomElement(PsiElement element, java.lang.Class<T> beanClass, boolean strict)
public static <T extends DomElement> DomFileElement<T> getFileElement(DomElement element)
public static XmlFile getFile(DomElement element)
public static DomElement getRoot(DomElement domElement)
domElement
- DomElement to search root ofpublic static boolean hasXml(DomElement element)
public static Pair<TextRange,PsiElement> getProblemRange(XmlTag tag)
public static <T extends DomElement> java.util.List<T> getChildrenOf(DomElement parent, java.lang.Class<T> type)