Interface ReflectionService


public interface ReflectionService
反射工具服務
  • Method Details

    • getDeclaredFieldsUpTo

      List<Field> getDeclaredFieldsUpTo(@Nonnull Class<?> startClass, @Nullable Class<?> exclusiveParent)
      取得整個 class 上下關係的 declared fields
      Parameters:
      startClass - 開始類別
      exclusiveParent - 到此父類別停止
      Returns:
      整個 class 上下關係的 declared fields
    • getDeclaredMethodsUpTo

      List<Method> getDeclaredMethodsUpTo(@Nonnull Class<?> startClass, @Nullable Class<?> exclusiveParent)
      取得整個 class 上下關係的 declared methods
      Parameters:
      startClass - 開始類別
      exclusiveParent - 到此父類別停止
      Returns:
      整個 class 上下關係的 declared methods
    • getDeclaredAnnotations

      從快取獲取反射加快速度
      Parameters:
      method - 方法
      Returns:
      標註列表
    • getDeclaredAnnotations

      從快取獲取反射加快速度
      Parameters:
      clazz - 類別
      Returns:
      類別標註列表
    • getMethods

      Method[] getMethods(Class<?> clazz)
      從快取獲取反射加快速度
      Parameters:
      clazz - 類別
      Returns:
      公共方法列表
    • getParameterAnnotations

      從快取獲取反射加快速度
      Parameters:
      method - 方法
      Returns:
      參數標註列表
    • getParameterTypes

      從快取獲取反射加快速度
      Parameters:
      method - 方法
      Returns:
      參數類型列表