|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nanocontainer.script.groovy.buildernodes.AbstractBuilderNode
org.nanocontainer.script.groovy.buildernodes.BeanNode
public class BeanNode
Creates on-the-spot Javabeans configurations and registers the result with the container via pico.registerCompoenntInstance.
Field Summary | |
---|---|
static java.lang.String |
BEAN_CLASS
Bean class attribute. |
static java.lang.String |
NODE_NAME
The name of the node we're handling. |
Constructor Summary | |
---|---|
BeanNode()
Default constructor. |
Method Summary | |
---|---|
protected java.lang.Object |
createBean(java.util.Map attributes)
Instantiates the bean and sets the appropriate attributes. |
java.lang.Object |
createNewNode(java.lang.Object current,
java.util.Map attributes)
Execute the handler for the given node builder. |
void |
validateScriptedAttributes(java.util.Map specifiedAttributes)
Validates a given map of attributes as supplied by the GroovyNodeBuilder against the node's supported attributes. |
Methods inherited from class org.nanocontainer.script.groovy.buildernodes.AbstractBuilderNode |
---|
addAttribute, getNodeName, getSupportedAttributes, isAttribute, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NODE_NAME
public static final java.lang.String BEAN_CLASS
Constructor Detail |
---|
public BeanNode()
Method Detail |
---|
public java.lang.Object createNewNode(java.lang.Object current, java.util.Map attributes)
BuilderNode
current
- the current object. May be null
for no parent container.attributes
- Map attributes specified in the groovy script
for the builder node.
in for consistency with the Groovy Builder API. Normally set to null.
protected java.lang.Object createBean(java.util.Map attributes)
attributes
- Map
public void validateScriptedAttributes(java.util.Map specifiedAttributes) throws org.nanocontainer.script.NanoContainerMarkupException
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.
This version only checks for 'beanClass' and lets all other attributes through (since they become property values)
validateScriptedAttributes
in interface BuilderNode
validateScriptedAttributes
in class AbstractBuilderNode
specifiedAttributes
- Map
org.nanocontainer.script.NanoContainerMarkupException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |