Class ReflectionUtils

java.lang.Object
com.aispect.common.util.ReflectionUtils

public final class ReflectionUtils extends Object
Utility class that encapsulates reflection operations.
  • Method Details

    • findAnnotatedMethods

      public static List<Method> findAnnotatedMethods(Class<?> clazz, Class<? extends Annotation> annotationClass)
      Find all methods in a class that are marked with a specific annotation.
      Parameters:
      clazz - target class
      annotationClass - Annotation class
      Returns:
      List of methods marked with this annotation
    • invokeMethod

      public static Object invokeMethod(Method method, Object target, Object... args) throws AiSpectException
      Safely execute methods reflectively.
      Parameters:
      method - method
      target - target audience
      args - Parameter list
      Returns:
      Execution result
      Throws:
      AiSpectException - Reflection execution exception