1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  package org.apache.commons.jexl.util.introspection;
18  
19  /***
20   * Method used for regular method invocation.
21   * 
22   * $foo.bar()
23   * 
24   * 
25   * @since 1.0
26   * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
27   * @version $Id: VelMethod.java 398513 2006-05-01 03:42:52Z dion $
28   */
29  public interface VelMethod {
30      /***
31       * invocation method - called when the method invocation should be performed
32       * and a value returned.
33  
34       * @param o the object
35       * @param params method parameters.
36       * @return the result
37       * @throws Exception on any error.
38       */
39      Object invoke(Object o, Object[] params) throws Exception;
40  
41      /***
42       * specifies if this VelMethod is cacheable and able to be reused for this
43       * class of object it was returned for.
44       * 
45       * @return true if can be reused for this class, false if not
46       */
47      boolean isCacheable();
48  
49      /***
50       * Gets the method name used.
51       * @return method name
52       */
53      String getMethodName();
54  
55      /***
56       * returns the return type of the method invoked.
57       * @return return type
58       */
59      Class getReturnType();
60  }