|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.config.generator.model.AbstractNodeElement
public abstract class AbstractNodeElement
An abstract implementation of NodeElement
. Overrides equals(Object)
and hashCode()
methods by comparing the fully
qualified name of this element -- getFQName()
Field Summary | |
---|---|
protected List<NodeAttribute> |
attributes
List of attributes |
protected List<NodeElement> |
children
List of child elements |
protected String |
innerContent
the inner string content |
protected boolean |
optional
Whether this element is optional |
protected NodeElement |
parent
The parent |
Constructor Summary | |
---|---|
AbstractNodeElement(NodeElement parent)
Constructor accepting the parent of this element |
Method Summary | |
---|---|
void |
accept(NodeElementVisitor visitor)
Accepts an NodeElementVisitor |
static void |
addAllFactoryConfigsAsChildElements(NodeElement element,
String name,
Collection<? extends FactoryConfiguration> factoryConfigurations)
Helper method that adds all the FactoryConfiguration from the parameter as child elements by creating
FactoryConfigurationElement for each of them |
void |
addAttribute(NodeAttribute attribute)
Add an attribute |
void |
addChildElement(NodeElement childElement)
Adds a child element. |
boolean |
equals(Object obj)
|
static List<FactoryConfigurationElement> |
getAllFactoryElements(NodeElement parent,
String name,
Collection factoryConfigurations1)
Helper method that creates FactoryConfigurationElement 's from a collection of FactoryConfiguration 's |
List<NodeAttribute> |
getAttributes()
List of attributes of this element |
List<NodeElement> |
getChildElements()
Returns the list of child elements. |
String |
getFQName()
Same as calling NodeElement.getFQName(String) with the string "." |
String |
getFQName(String delimiter)
The fully qualified name of the element. |
String |
getInnerContent()
The inner content of this element as string. |
abstract String |
getName()
The name of the element |
NodeElement |
getParent()
Returns the parent of this element. |
boolean |
hasChildren()
Returns true if there is at least one child |
int |
hashCode()
|
boolean |
isOptional()
Returns true if this element is optional |
void |
setInnerContent(String content)
Sets the inner content of this element |
void |
setOptional(boolean optional)
Sets optional or not |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final List<NodeAttribute> attributes
protected final List<NodeElement> children
protected NodeElement parent
protected boolean optional
protected String innerContent
Constructor Detail |
---|
public AbstractNodeElement(NodeElement parent)
parent
- Method Detail |
---|
public abstract String getName()
getName
in interface NodeElement
public NodeElement getParent()
getParent
in interface NodeElement
public List<NodeAttribute> getAttributes()
getAttributes
in interface NodeElement
public List<NodeElement> getChildElements()
getChildElements
in interface NodeElement
public void addAttribute(NodeAttribute attribute)
addAttribute
in interface NodeElement
attribute
- add an attributepublic void addChildElement(NodeElement childElement)
addChildElement
in interface NodeElement
childElement
- adds a child elementpublic boolean isOptional()
isOptional
in interface NodeElement
public void setOptional(boolean optional)
setOptional
in interface NodeElement
public boolean hasChildren()
hasChildren
in interface NodeElement
public String getInnerContent()
getInnerContent
in interface NodeElement
public void setInnerContent(String content)
setInnerContent
in interface NodeElement
public static void addAllFactoryConfigsAsChildElements(NodeElement element, String name, Collection<? extends FactoryConfiguration> factoryConfigurations)
FactoryConfiguration
from the parameter as child elements by creating
FactoryConfigurationElement
for each of them
element
- the element in which the child elements will be addedname
- name to be used for the child element(s)factoryConfigurations
- the FactoryConfiguration
'spublic static List<FactoryConfigurationElement> getAllFactoryElements(NodeElement parent, String name, Collection factoryConfigurations1)
FactoryConfigurationElement
's from a collection of FactoryConfiguration
's
parent
- the parent for each of the create FactoryConfigurationElement
name
- name of the element(s)factoryConfigurations
- the FactoryConfiguration
's
FactoryConfigurationElement
public String getFQName()
NodeElement.getFQName(String)
with the string "."
getFQName
in interface NodeElement
public String getFQName(String delimiter)
delimiter
string
getFQName
in interface NodeElement
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public void accept(NodeElementVisitor visitor)
NodeElementVisitor
accept
in interface NodeElement
visitor
- the visitor whose visit methods will be called
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |