Class Xpp3Dom
java.lang.Object
org.apache.maven.shared.utils.xml.Xpp3Dom
A reimplementation of Plexus Xpp3Dom based on the public interface of Plexus Xpp3Dom.
- Author:
- Kristian Rosenvold
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The attribute append.static final String
The attribute which identifies merge/append.static final String
The attribute which identifiesmerge
static final String
The name of the attribute.static final String
The attributes which identifiesoverride
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
getAttribute
(String nameParameter) String[]
getChild
(int i) int
Xpp3Dom[]
Xpp3Dom[]
getChildren
(String nameParameter) getName()
getValue()
int
hashCode()
static boolean
Deprecated.static boolean
isNotEmpty
(String str) Deprecated.usestr != null && !str.isEmpty()
iterator()
static Xpp3Dom
mergeXpp3Dom
(Xpp3Dom dominant, Xpp3Dom recessive) static Xpp3Dom
mergeXpp3Dom
(Xpp3Dom dominant, Xpp3Dom recessive, Boolean childMergeOverride) void
removeChild
(int i) void
setAttribute
(String nameParameter, String valueParameter) void
void
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
CHILDREN_COMBINATION_MODE_ATTRIBUTE
The attribute which identifies merge/append.- See Also:
-
CHILDREN_COMBINATION_APPEND
The attribute append.- See Also:
-
SELF_COMBINATION_MODE_ATTRIBUTE
The name of the attribute.- See Also:
-
SELF_COMBINATION_OVERRIDE
The attributes which identifiesoverride
.- See Also:
-
SELF_COMBINATION_MERGE
The attribute which identifiesmerge
- See Also:
-
-
Constructor Details
-
Xpp3Dom
- Parameters:
name
- The name of the instance.
-
-
Method Details
-
getName
- Returns:
- The current name.
-
getValue
- Returns:
- The current value.
-
setValue
- Parameters:
value
- The value to be set.
-
getAttributeNames
- Returns:
- The array of attribute names.
-
getAttribute
- Parameters:
nameParameter
- The name of the attribute.- Returns:
- The attribute value.
-
setAttribute
- Parameters:
nameParameter
- The name of the attribute.valueParameter
- The value of the attribute.
-
getChild
- Parameters:
i
- The index to be selected.- Returns:
- The child selected by index.
-
getChild
- Parameters:
nameParameter
- The name of the child.- Returns:
- The child selected by name.
-
getChildren
- Returns:
- The array of childs.
-
getChildren
- Parameters:
nameParameter
- The name of the child.- Returns:
- The array of the Dom.
-
getChildCount
public int getChildCount()- Returns:
- The number of childs.
-
removeChild
public void removeChild(int i) - Parameters:
i
- The child to be removed.
-
getParent
- Returns:
- The current parent.
-
equals
-
hashCode
public int hashCode() -
toString
-
toUnescapedString
- Returns:
- Unescaped string.
-
isNotEmpty
Deprecated.usestr != null && !str.isEmpty()
Warning: this is not the reverse ofisEmpty(java.lang.String)
. Whitespace only strings are both empty and not empty.- Parameters:
str
- the string to be checked- Returns:
- true if the string is not empty (length > 0) and not
null
-
isEmpty
Deprecated.usestr == null || str.trim().isEmpty()
Warning: this is not the reverse ofisNotEmpty(java.lang.String)
. Whitespace only strings are both empty and not empty.- Parameters:
str
- the string to be checked- Returns:
- true if the string only contains whitespace or is
null
-
iterator
-
str == null || str.trim().isEmpty()