public class BeanPlugin extends AbstractNodeSupportPlugin implements ResolvedBeanCallback
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
beanParser, prefixABSTRACT, ALIAS, BEAN, BEAN_PROPERTY_PREFIX, BEAN_PROPERTY_REF_SUFFIX, CLASS, CONSTRUCTOR_ARGS, DESTROY_METHOD, ENTRY, FACTORY_BEAN, FACTORY_METHOD, ID, IDREF, INDEX, INIT_METHOD, KEY, KEY_REF, LIST, LOCAL, MAP, NAME, NULL, PARENT, PROP, PROPS, PROTOTYPE, REF, RESOURCE, SCOPE, SET, SINGLETON, TYPE, VALUE, VALUE_REF, XML_NAMESPACE_DEF, XML_NAMESPACE_DELIMITER, XPATH_BEAN, XPATH_BEANS_NODE, XPATH_IMPORT, XPATH_PROPERTY| Constructor and Description |
|---|
BeanPlugin() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createBean(Node beanNode)
Parse a
|
String |
getUnprefixedSupportedNode() |
Property |
handleNode(Node node,
String propName)
Process a special node type and encapsulate the result as a Property
|
String |
onResolve(Bean bean,
Node beanNode,
NamedNodeMap beanAttributes,
boolean isAnonymous,
BeanContainer container)
Important: do not use the beanParser.getContainer() here as the points at the initial BeanContainer used when processing the
|
protected String |
processBeanNodeAttributes(Node beanNode,
NamedNodeMap beanAttributes,
String id,
String alias,
boolean isAnonymous,
Bean bean,
BeanContainer container)
Process a
|
getSupportedNode, setBeanContainer, setPrefixpublic String getUnprefixedSupportedNode()
getUnprefixedSupportedNode in class AbstractNodeSupportPluginpublic Property handleNode(Node node, String propName) throws XPathExpressionException
NodeSupportPluginhandleNode in interface NodeSupportPluginnode - Node to processpropName - of the property representing the content of the nodeXPathExpressionExceptionprotected String createBean(Node beanNode) throws XPathExpressionException
beanNode - XML XPathExpressionExceptionprotected String processBeanNodeAttributes(Node beanNode, NamedNodeMap beanAttributes, String id, String alias, boolean isAnonymous, Bean bean, BeanContainer container) throws XPathExpressionException
beanNode - beanAttributes - id - alias - isAnonymous - bean - container - the BeanContainer to useXPathExpressionExceptionpublic String onResolve(Bean bean, Node beanNode, NamedNodeMap beanAttributes, boolean isAnonymous, BeanContainer container) throws XPathExpressionException
onResolve in interface ResolvedBeanCallbackbean - newly resolved BeanbeanNode - XML node matching this new BeanbeanAttributes - Map of the Bean's attributesisAnonymous - whether the bean is anonymous or notcontainer - is the current aggregated BeanContainer used for Bean resolution
(in case of import, it may not be the same as the one used when registring the dependency)XPathExpressionExceptionCopyright © 2012-2013 Static IOC OSS project. All Rights Reserved.