|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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<? extends FactoryConfiguration> factoryConfigurations)
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 NodeElementpublic NodeElement getParent()
getParent in interface NodeElementpublic List<NodeAttribute> getAttributes()
getAttributes in interface NodeElementpublic List<NodeElement> getChildElements()
getChildElements in interface NodeElementpublic void addAttribute(NodeAttribute attribute)
addAttribute in interface NodeElementattribute - add an attributepublic void addChildElement(NodeElement childElement)
addChildElement in interface NodeElementchildElement - adds a child elementpublic boolean isOptional()
isOptional in interface NodeElementpublic void setOptional(boolean optional)
setOptional in interface NodeElementpublic boolean hasChildren()
hasChildren in interface NodeElementpublic String getInnerContent()
getInnerContent in interface NodeElementpublic 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's
public static List<FactoryConfigurationElement> getAllFactoryElements(NodeElement parent,
String name,
Collection<? extends FactoryConfiguration> factoryConfigurations)
FactoryConfigurationElement's from a collection of FactoryConfiguration's
parent - the parent for each of the create FactoryConfigurationElementname - name of the element(s)factoryConfigurations - the FactoryConfiguration's
FactoryConfigurationElementpublic String getFQName()
NodeElement.getFQName(String) with the string "."
getFQName in interface NodeElementpublic String getFQName(String delimiter)
delimiter string
getFQName in interface NodeElementpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic void accept(NodeElementVisitor visitor)
NodeElementVisitor
accept in interface NodeElementvisitor - 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 | |||||||||