|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springmodules.validation.valang.functions.AbstractFunction
public abstract class AbstractFunction
Base class for functions. Function classes should extend this class.
The lifecyle of a function that extends this class is:
AbstractFunction(Function[], int, int)
org.springframework.beans.factory.BeanFactoryAware#setBeanFactory(org.springframework.beans.factory.BeanFactory)
org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
org.springframework.context.ResourceLoaderAware#setResourceLoader(org.springframework.core.io.ResourceLoader)
org.springframework.context.MessageSourceAware#setMessageSource(org.springframework.context.MessageSource)
org.springframework.context.ApplicationEventPublisherAware#setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)
org.springframework.web.context.ServletContextAware#setServletContext(javax.servlet.ServletContext)
isAutowireByName() returns true
isAutowireByType() returns true
init() is called
Function implementations can implement any of the Spring callback interfaces listed above to get access to the specific objects.
| Constructor Summary | |
|---|---|
AbstractFunction(Function[] arguments,
int line,
int column)
Sub classes must implement this constructor. |
|
| Method Summary | |
|---|---|
protected void |
definedExactNumberOfArguments(int exactNumberOfArguments)
Call this method in the constructor of custom functions to define the exact number of arguments. |
protected void |
definedMaxNumberOfArguments(int maxNumberOfArguments)
Call this method in the constructor of custom functions to define the maximum number of arguments. |
protected void |
definedMinNumberOfArguments(int minNumberOfArguments)
Call this method in the constructor of custom functions to define the minimum number of arguments. |
protected abstract java.lang.Object |
doGetResult(java.lang.Object target)
|
Function[] |
getArguments()
|
java.lang.Object |
getResult(java.lang.Object target)
Gets the result of the function. |
protected FunctionTemplate |
getTemplate()
|
void |
init()
This method is called when all properties have been set through autowiring. |
boolean |
isAutowireByName()
If true properties of function will be autowired by name by the Spring bean factory. |
boolean |
isAutowireByType()
If true properties of function will be autowired by type by the Spring bean factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractFunction(Function[] arguments,
int line,
int column)
| Method Detail |
|---|
public Function[] getArguments()
protected void definedMinNumberOfArguments(int minNumberOfArguments)
protected void definedMaxNumberOfArguments(int maxNumberOfArguments)
protected void definedExactNumberOfArguments(int exactNumberOfArguments)
protected FunctionTemplate getTemplate()
public final java.lang.Object getResult(java.lang.Object target)
FunctionGets the result of the function.
getResult in interface Functiontarget - the target bean
protected abstract java.lang.Object doGetResult(java.lang.Object target)
throws java.lang.Exception
java.lang.Exceptionpublic boolean isAutowireByType()
public boolean isAutowireByName()
public void init()
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||