|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.picocontainer.script.groovy.nodes.AbstractBuilderNode
org.picocontainer.script.groovy.nodes.BeanNode
public class BeanNode
Creates on-the-spot Javabeans configurations and registers the result with the container @link MutablePicoContainer#addComponent}.
Field Summary | |
---|---|
static String |
BEAN_CLASS
Bean class attribute. |
static String |
NODE_NAME
The name of the node we're handling. |
Constructor Summary | |
---|---|
BeanNode()
Default constructor. |
Method Summary | |
---|---|
protected Object |
createBean(Map<String,Object> attributes)
Instantiates the bean and sets the appropriate attributes. |
Object |
createNewNode(Object current,
Map<String,Object> attributes)
Creates a new node . |
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 org.picocontainer.script.groovy.nodes.AbstractBuilderNode |
---|
addAttribute, getNodeName, getSupportedAttributeNames, isAttribute, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NODE_NAME
public static final String BEAN_CLASS
Constructor Detail |
---|
public BeanNode()
Method Detail |
---|
public Object createNewNode(Object current, Map<String,Object> attributes)
BuilderNode
current
- the current Object - may be null
for no
parent container.attributes
- the Map of scripted attributes for the builder node -
may be null
protected Object createBean(Map<String,Object> attributes)
attributes
- Map
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.
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
ScriptedPicoContainerMarkupException
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |