| 
||||||||||
| 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)
 BeanFactoryAware.setBeanFactory(org.springframework.beans.factory.BeanFactory)
 ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
 ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader)
 MessageSourceAware.setMessageSource(org.springframework.context.MessageSource)
 ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)
 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 | |
|---|---|
protected  | 
AbstractFunction()
Constructor  | 
  | 
AbstractFunction(Function[] arguments,
                 int line,
                 int column)
Constructor Note: Sub classes must implement this constructor unless they implement ConfigurableConstructor. | 
| 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  Object | 
doGetResult(Object target)
Processes result for subclasses.  | 
 Function[] | 
getArguments()
Gets arguments  | 
 Object | 
getResult(Object target)
Gets result.  | 
protected  FunctionTemplate | 
getTemplate()
Gets template.  | 
 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.  | 
protected  void | 
setArguments(Function[] arguments)
Sets arguments.  | 
protected  void | 
setTemplate(FunctionTemplate template)
Sets template.  | 
protected  void | 
setTemplate(int line,
            int column)
Sets template with line and row number by creating a new FunctionTemplate. | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
protected AbstractFunction()
public AbstractFunction(Function[] arguments,
                        int line,
                        int column)
Constructor
Note: Sub classes must implement this constructor 
 unless they implement ConfigurableConstructor.
| Method Detail | 
|---|
public Function[] getArguments()
protected void setArguments(Function[] arguments)
protected FunctionTemplate getTemplate()
protected void setTemplate(FunctionTemplate template)
protected void setTemplate(int line,
                           int column)
FunctionTemplate.
protected void definedMinNumberOfArguments(int minNumberOfArguments)
protected void definedMaxNumberOfArguments(int maxNumberOfArguments)
protected void definedExactNumberOfArguments(int exactNumberOfArguments)
public final Object getResult(Object target)
Function.
getResult in interface Functiontarget - the target bean
protected abstract Object doGetResult(Object target)
                               throws Exception
Exceptionpublic boolean isAutowireByType()
public boolean isAutowireByName()
public void init()
          throws Exception
Exception
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||