|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.picocontainer.script.groovy.nodes.AbstractBuilderNode
public abstract class AbstractBuilderNode
Abstract base class for custom nodes. Also provides basic services and construction capabilities.
Constructor Summary | |
---|---|
AbstractBuilderNode(String nodeName)
Constructs a custom node builder. |
Method Summary | |
---|---|
protected AbstractBuilderNode |
addAttribute(String name)
Add an attribute to the list of ones supported by this node. |
String |
getNodeName()
Returns the name of the node, eg 'container' or 'component'. |
Set<String> |
getSupportedAttributeNames()
Returns the supported attribute names. |
protected boolean |
isAttribute(Map<String,Object> attributes,
String key)
Checks that an attribute actually exists in the attirbute map. |
String |
toString()
|
void |
validateScriptedAttributes(Map<String,Object> specifiedAttributes)
Validates a the attributes as supplied by the node builder against the node's supported attributes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.picocontainer.script.groovy.BuilderNode |
---|
createNewNode |
Constructor Detail |
---|
public AbstractBuilderNode(String nodeName)
nodeName
- the name of the node we're constructing.Method Detail |
---|
protected AbstractBuilderNode addAttribute(String name)
name
- String the name of the attribute we support.
public String getNodeName()
BuilderNode
getNodeName
in interface BuilderNode
public Set<String> getSupportedAttributeNames()
BuilderNode
getSupportedAttributeNames
in interface BuilderNode
public String toString()
toString
in class Object
protected boolean isAttribute(Map<String,Object> attributes, String key)
attributes
- Map the current node's attributes.key
- String the attribute key we're looking for.
public void validateScriptedAttributes(Map<String,Object> specifiedAttributes) throws ScriptedPicoContainerMarkupException
This particular implementation checks all specified attribute keynames against the names supported in the node type. It does not type checking against the values passed in via the attributes.
validateScriptedAttributes
in interface BuilderNode
specifiedAttributes
- the attributes as passed in by the groovy
script.
ScriptedPicoContainerMarkupException
- if an attribute is specified
that is not recognized.
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |