Additional top-level class in compilation unit: FactoryInterceptorMetaClass.
Warning
this implementation is not thread safe and should not be used across threads in a multi-threaded environment. A locking mechanism should be implemented by the subclass if use is expected across multiple threads.
| Modifier and Type | Field and Description |
|---|---|
| protected LinkedList | |
| protected boolean | |
| protected boolean | |
| public static final String | |
| private final ThreadLocal | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| private final List | |
| protected Map | |
| protected Map | |
| private final Map | |
| private FactoryBuilderSupport | |
| private final ThreadLocal | |
| private static final Logger | |
| private static final Comparator | |
| protected Closure | |
| private Closure | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| protected LinkedList | |
| protected LinkedList | |
| protected LinkedList | |
| protected Closure | |
| protected Map | |
| protected String | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Closure | Returns: attrDelegatethe closure to be called attrDelegate)Add an attribute delegate so it can intercept attributes being set. |
| public void | |
| public Closure | Returns: delegatethe closure to invoke delegate)Add a postInstantiate delegate so it can intercept nodes after they are created. |
| public Closure | Returns: delegatethe closure to invoke delegate)Add a nodeCompletion delegate so it can intercept nodes after they done with building. |
| public Closure | Returns: delegatethe closure to invoke delegate)Add a preInstantiate delegate so it can intercept nodes before they are created. |
| public void | |
| public Object | |
| public Object | |
| public Object | |
| private void | |
| protected boolean | |
| public static void | checkValueIsNull(Object
the node's value value, Object the node's name name)Throws an exception if value is null. |
| public static boolean | Returns: true if type is assignable to the value's class, false if value is null.the node's value value, Object the node's name name, Class<T> a Class that may be assignable to the value's class type)Checks type of value against builder type |
| public static boolean | Returns: Returns true if type is assignable to the value's class, false if value is null or a String.the node's value value, Object the node's name name, Class<T> a Class that may be assignable to the value's class type)Checks values against factory's type |
| protected Object | Returns: the object return from the factorythe name of the node name, Map<K, V> the attributes for the node attributes, Object the value arguments for the node value)This method is responsible for instantiating a node and configure its properties. |
| protected Object | |
| protected Object | dispathNodeCall(Object name, Object args)
Deprecated
Use FactoryBuilderSupport#dispatchNodeCall(Object, Object) instead.
|
| public void | |
| private Object | |
| private Object | |
| private Map | |
| private Object | Returns: the object from the factorythe name of the method being invoked methodName, Object the name of the node name, Object the arguments passed into the node args)This method is the workhorse of the builder. |
| private void | |
| private void | |
| public List | |
| public FactoryBuilderSupport | |
| public Map | |
| public Object | |
| protected LinkedList | |
| protected Map | Returns: the mapStores the thread local states in a Map that can be passed across threads |
| public Object | |
| public FactoryBuilderSupport | |
| public Factory | |
| public String | |
| public List | |
| public Map | |
| public Map | |
| public Map | |
| public Map | |
| public Map | |
| public Map | |
| public Closure | |
| public Object | |
| public Closure | |
| public Map | |
| public Factory | |
| public String | |
| public Object | |
| public List | |
| public List | |
| public List | |
| public Object | getProperty(String
the name of the property of interest property)Overrides groovy. Overrides default groovy. |
| public Closure | |
| protected FactoryBuilderSupport | Returns: the current builder that serves as a proxy.Proxy builders are useful for changing the building context, thus enabling mix & match builders. |
| private Set | |
| public Set | |
| public Set | |
| public Object | Returns: the variable valuethe name of the variable to lookup name)Overrides groovy. |
| public Map | |
| protected void | handleNodeAttributes(Object
the object returned by tne node factory node, Map<K, V> the attributes for the node attributes)Assigns any existing properties to the node. |
| public Object | Returns: the result of the callthe name of the method to invoke methodName)Convenience method when no arguments are required |
| public Object | invokeMethod(String
the name of the method to call methodName, Object the arguments to use for the method call args)Overrides default groovy. |
| protected void | |
| protected void | nodeCompleted(Object
the parent of the node being processed parent, Object the current node being processed node)A hook to allow nodes to be processed once they have had all of their children applied. |
| protected Map | |
| protected void | postInstantiate(Object
the name of the node name, Map<K, V> the attributes for the node attributes, Object the object created by the node factory node)A hook after the factory creates the node and before attributes are set. |
| protected Object | Returns: the node, possibly new, that represents the markup elementthe parent of the node being processed parent, Object the current node being processed node)A hook to allow nodes to be processed once they have had all of their children applied and allows the actual node object that represents the Markup element to be changed. |
| protected void | preInstantiate(Object
the name of the node name, Map<K, V> the attributes of the node attributes, Object the value argument(s) of the node value)A hook before the factory creates the node. |
| public void | registerBeanFactory(String
name of the node theName, Class<T> the factory to handle the name beanClass)Registers a factory for a JavaBean. |
| public void | registerBeanFactory(String
name of the node theName, String thr group to register this node in groupName, final Class<T> the factory to handle the name beanClass)Registers a factory for a JavaBean. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | registerFactory(String
the name of the node name, Factory the factory to return the values factory)Registers a factory for a node name. |
| public void | registerFactory(String
the name of the node name, String thr group to register this node in groupName, Factory the factory to return the values factory)Registers a factory for a node name. |
| public void | removeAttributeDelegate(Closure<V>
the instance of the closure to be removed attrDelegate)Remove the most recently added instance of the attribute delegate. |
| public void | removePostInstantiateDelegate(Closure<V>
the closure to invoke delegate)Remove the most recently added instance of the postInstantiate delegate. |
| public void | removePostNodeCompletionDelegate(Closure<V>
the closure to be removed delegate)Remove the most recently added instance of the nodeCompletion delegate. |
| public void | removePreInstantiateDelegate(Closure<V>
the closure to invoke delegate)Remove the most recently added instance of the preInstantiate delegate. |
| protected void | |
| protected Closure | Returns: the closure for the matched explicit method.the name of the explicit method methodName, Object the arguments for the method args)This is a hook for subclasses to plugin a custom strategy for mapping names to explicit methods. |
| protected Closure | Returns: the get and set closures (in that order) for the matched explicit property.the name of the explicit method propertyName)This is a hook for subclasses to plugin a custom strategy for mapping names to property methods. |
| protected Factory | Returns: the Factory associated with name.the name of the factory name, Map<K, V> the attributes from the node attributes, Object value arguments from te node value)This is a hook for subclasses to plugin a custom strategy for mapping names to factories. |
| protected void | restoreFromContinuationData(Map<String, Object>
the data retrieved from a compatible getContinuationData call data)Restores the state of the current builder to the same state as an older build. |
| protected void | setClosureDelegate(Closure<V>
the closure on which to call setDelegate() closure, Object the node value that we've just created, which could be a
builder node)A strategy method to allow derived builders to use builder-trees and switch in different kinds of builders. |
| public void | |
| public void | |
| protected void | setNodeAttributes(Object
the object from the node node, Map<K, V> the attributes to be set attributes)Maps attributes key/values to properties on node. |
| protected void | |
| public void | setProperty(String
the name of the property of interest property, Object the new value for the property newValue)Overrides groovy. Overrides default groovy. |
| public void | |
| protected void | setProxyBuilder(FactoryBuilderSupport
the new proxy proxyBuilder)Sets the builder to be used as a proxy. |
| public void | setVariable(String
the name of the variable to set name, Object the new value for the given variable value)Overrides groovy. |
| public Object | Returns: the execution result of the closure.the temporary builder to switch to as proxyBuilder. builder, Closure<V> the closure to be executed under the temporary builder. closure)Switches the builder's proxyBuilder during the execution of a closure. |
| public Object | Returns: a node that responds to value of name with the closure's result as its value.the temporary builder to switch to as proxyBuilder. builder, String the node to build on the 'parent' builder. name, Closure<V> the closure to be executed under the temporary builder. closure)Switches the builder's proxyBuilder during the execution of a closure. |
| public Object | Returns: a node that responds to value of name with the closure's result as its value.additional properties for the node on the parent builder. attributes, FactoryBuilderSupport the temporary builder to switch to as proxyBuilder. builder, String the node to build on the 'parent' builder. name, Closure<V> the closure to be executed under the temporary builder. closure)Switches the builder's proxyBuilder during the execution of a closure. |