public final class ReflectCache extends Object
| 构造器和说明 |
|---|
ReflectCache() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Field |
getDeclaredField(Class<?> cls,
String name)
获取class 字段
|
static Field[] |
getDeclaredFields(Class<?> cls)
获取class 所有字段
|
static Method |
getDeclaredMethod(Class<?> cls,
String name,
Class<?>... parameterTypes)
获取class 方法
|
static Method[] |
getDeclaredMethods(Class<?> cls)
获取方法
|
public static Field[] getDeclaredFields(Class<?> cls)
cls - clspublic static Field getDeclaredField(Class<?> cls, String name) throws NoSuchFieldException, SecurityException
cls - clsname - nameNoSuchFieldException - ySecurityException - ypublic static Method getDeclaredMethod(Class<?> cls, String name, Class<?>... parameterTypes) throws NoSuchMethodException, SecurityException
cls - clsname - nameparameterTypes - typesNoSuchMethodException - ySecurityException - ypublic static Method[] getDeclaredMethods(Class<?> cls) throws NoSuchMethodException, SecurityException
cls - clsNoSuchMethodException - ySecurityException - yCopyright © 2017 Pivotal Software, Inc.. All rights reserved.