org.red5.server.service
Class ReflectionUtils

java.lang.Object
  extended by org.red5.server.service.ReflectionUtils

public class ReflectionUtils
extends Object

Provides a means for locating methods within service classes using reflection.


Constructor Summary
ReflectionUtils()
           
 
Method Summary
static Object[] findMethodWithExactParameters(Object service, String methodName, List<?> args)
          Returns (method, params) for the given service or (null, null) if no method was found.
static Object[] findMethodWithExactParameters(Object service, String methodName, Object[] args)
          Returns (method, params) for the given service or (null, null) if not method was found.
static Object[] findMethodWithListParameters(Object service, String methodName, List<?> args)
          Returns (method, params) for the given service or (null, null) if no method was found.
static Object[] findMethodWithListParameters(Object service, String methodName, Object[] args)
          Returns (method, params) for the given service or (null, null) if not method was found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionUtils

public ReflectionUtils()
Method Detail

findMethodWithExactParameters

public static Object[] findMethodWithExactParameters(Object service,
                                                     String methodName,
                                                     List<?> args)
Returns (method, params) for the given service or (null, null) if no method was found.

Parameters:
service - Service
methodName - Method name
args - Arguments
Returns:
Method/params pairs

findMethodWithExactParameters

public static Object[] findMethodWithExactParameters(Object service,
                                                     String methodName,
                                                     Object[] args)
Returns (method, params) for the given service or (null, null) if not method was found. XXX use ranking for method matching rather than exact type matching plus type conversion.

Parameters:
service - Service
methodName - Method name
args - Arguments
Returns:
Method/params pairs

findMethodWithListParameters

public static Object[] findMethodWithListParameters(Object service,
                                                    String methodName,
                                                    List<?> args)
Returns (method, params) for the given service or (null, null) if no method was found.

Parameters:
service - Service
methodName - Method name
args - Arguments
Returns:
Method/params pairs

findMethodWithListParameters

public static Object[] findMethodWithListParameters(Object service,
                                                    String methodName,
                                                    Object[] args)
Returns (method, params) for the given service or (null, null) if not method was found.

Parameters:
service - Service
methodName - Method name
args - Arguments
Returns:
Method/params pairs


Copyright © 2006-2012 The Red5 Project