Package com.ericlam.mc.eld.services
Interface ReflectionService
public interface ReflectionService
反射工具服務
-
Method Summary
Modifier and TypeMethodDescriptiongetDeclaredAnnotations(Class<?> clazz) 從快取獲取反射加快速度getDeclaredAnnotations(Method method) 從快取獲取反射加快速度getDeclaredFieldsUpTo(Class<?> startClass, Class<?> exclusiveParent) 取得整個 class 上下關係的 declared fieldsgetDeclaredMethodsUpTo(Class<?> startClass, Class<?> exclusiveParent) 取得整個 class 上下關係的 declared methodsMethod[]getMethods(Class<?> clazz) 從快取獲取反射加快速度Annotation[][]getParameterAnnotations(Method method) 從快取獲取反射加快速度Type[]getParameterTypes(Method method) 從快取獲取反射加快速度
-
Method Details
-
getDeclaredFieldsUpTo
取得整個 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
從快取獲取反射加快速度- Parameters:
clazz- 類別- Returns:
- 公共方法列表
-
getParameterAnnotations
從快取獲取反射加快速度- Parameters:
method- 方法- Returns:
- 參數標註列表
-
getParameterTypes
從快取獲取反射加快速度- Parameters:
method- 方法- Returns:
- 參數類型列表
-