|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectflex.messaging.util.MethodMatcher
public class MethodMatcher
A utility class used to find a suitable method based on matching signatures to the types of set of arguments. Since the arguments may be from more loosely typed environments such as ActionScript, a translator can be employed to handle type conversion. Note that there isn't a great guarantee for which method will be selected when several overloaded methods match very closely through the use of various combinations of generic types.
| Nested Class Summary | |
|---|---|
static class |
MethodMatcher.Match
A utiltiy class to help rank methods in the search for a best match, given a name and collection of input parameters. |
| Constructor Summary | |
|---|---|
MethodMatcher()
|
|
| Method Summary | |
|---|---|
static void |
convertParams(List parameters,
Class[] desiredParamTypes,
MethodMatcher.Match currentMatch)
Utility method to convert a collection of parameters to desired types. |
Method |
getMethod(Class c,
String methodName,
List parameters)
Utility method that searches a class for a given method, taking into account the supplied parameters when evaluating overloaded method signatures. |
static void |
methodNotFound(String methodName,
Class[] suppliedParamTypes,
MethodMatcher.Match bestMatch)
Utility method to provide more detailed information in the event that a search for a specific method failed for the service class. |
static Class[] |
paramTypes(List parameters)
Utility method that iterates over a collection of input parameters to determine their types while logging the class names to create a unique identifier for a method signature. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MethodMatcher()
| Method Detail |
|---|
public Method getMethod(Class c,
String methodName,
List parameters)
c - the classmethodName - desired method to search forparameters - required to distinguish between overloaded methods of the same name
public static void convertParams(List parameters,
Class[] desiredParamTypes,
MethodMatcher.Match currentMatch)
parameters - desiredParamTypes - currentMatch - public static Class[] paramTypes(List parameters)
parameters - - A list of supplied parameters.
public static void methodNotFound(String methodName,
Class[] suppliedParamTypes,
MethodMatcher.Match bestMatch)
methodName - the name of the missing methodsuppliedParamTypes - the types of parameters supplied for the searchbestMatch - the best match found during the search
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/util/MethodMatcher.html