net.esper.util
Class StaticMethodResolver

java.lang.Object
  extended by net.esper.util.StaticMethodResolver

public class StaticMethodResolver
extends java.lang.Object

Used for retrieving static method objects. It provides two points of added functionality over the standard java.lang.reflect mechanism of retrieving methods. First, class names can be partial, and if the class name is partial then java.lang is searched for the class. Second, invocation parameter types don't have to match the declaration parameter types exactly when the standard java conversion mechanisms (currently autoboxing and widening conversions) will make the invocation valid. Preference is given to those methods that require the fewest widening conversions.


Constructor Summary
StaticMethodResolver()
           
 
Method Summary
static java.lang.reflect.Method resolveMethod(java.lang.String className, java.lang.String methodName, java.lang.Class[] paramTypes, AutoImportService autoImportService)
          Attempts to find the static method described by the parameters, or a method of the same name that will accept the same type of parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticMethodResolver

public StaticMethodResolver()
Method Detail

resolveMethod

public static java.lang.reflect.Method resolveMethod(java.lang.String className,
                                                     java.lang.String methodName,
                                                     java.lang.Class[] paramTypes,
                                                     AutoImportService autoImportService)
                                              throws java.lang.ClassNotFoundException,
                                                     java.lang.NoSuchMethodException
Attempts to find the static method described by the parameters, or a method of the same name that will accept the same type of parameters.

Parameters:
className - - the name of the class that declared this method
methodName - - the name of the method
paramTypes - - the parameter types for the method
autoImportService - - for resolving the class name
Returns:
- the Method object for this method
Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException