Class ReflectionUtils

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

public class ReflectionUtils extends Object
Provides a means for locating methods within service classes using reflection.
  • Field Details

    • log

      private static final org.slf4j.Logger log
    • nullReturn

      private static final Object[] nullReturn
  • Constructor Details

    • ReflectionUtils

      public ReflectionUtils()
  • Method Details

    • 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