Lines Matching refs:klass

24   public static boolean canDiscoverWithGetDeclaredField(Class<?> klass, String name) {  in canDiscoverWithGetDeclaredField()  argument
26 klass.getDeclaredField(name); in canDiscoverWithGetDeclaredField()
33 public static boolean canDiscoverWithGetDeclaredFields(Class<?> klass, String name) { in canDiscoverWithGetDeclaredFields() argument
34 for (Field f : klass.getDeclaredFields()) { in canDiscoverWithGetDeclaredFields()
42 public static boolean canDiscoverWithGetField(Class<?> klass, String name) { in canDiscoverWithGetField() argument
44 klass.getField(name); in canDiscoverWithGetField()
51 public static boolean canDiscoverWithGetFields(Class<?> klass, String name) { in canDiscoverWithGetFields() argument
52 for (Field f : klass.getFields()) { in canDiscoverWithGetFields()
60 public static boolean canGetField(Class<?> klass, String name) { in canGetField() argument
62 Field f = klass.getDeclaredField(name); in canGetField()
64 f.getInt(Modifier.isStatic(f.getModifiers()) ? null : klass.newInstance()); in canGetField()
72 public static boolean canSetField(Class<?> klass, String name) { in canSetField() argument
74 Field f = klass.getDeclaredField(name); in canSetField()
76 f.setInt(Modifier.isStatic(f.getModifiers()) ? null : klass.newInstance(), 42); in canSetField()
84 public static boolean canDiscoverWithGetDeclaredMethod(Class<?> klass, String name) { in canDiscoverWithGetDeclaredMethod() argument
86 klass.getDeclaredMethod(name); in canDiscoverWithGetDeclaredMethod()
93 public static boolean canDiscoverWithGetDeclaredMethods(Class<?> klass, String name) { in canDiscoverWithGetDeclaredMethods() argument
94 for (Method m : klass.getDeclaredMethods()) { in canDiscoverWithGetDeclaredMethods()
102 public static boolean canDiscoverWithGetMethod(Class<?> klass, String name) { in canDiscoverWithGetMethod() argument
104 klass.getMethod(name); in canDiscoverWithGetMethod()
111 public static boolean canDiscoverWithGetMethods(Class<?> klass, String name) { in canDiscoverWithGetMethods() argument
112 for (Method m : klass.getMethods()) { in canDiscoverWithGetMethods()
120 public static boolean canInvokeMethod(Class<?> klass, String name) { in canInvokeMethod() argument
122 Method m = klass.getDeclaredMethod(name); in canInvokeMethod()
124 m.invoke(klass.isInterface() ? null : klass.newInstance()); in canInvokeMethod()
132 public static boolean canDiscoverWithGetDeclaredConstructor(Class<?> klass, Class<?> args[]) { in canDiscoverWithGetDeclaredConstructor() argument
134 klass.getDeclaredConstructor(args); in canDiscoverWithGetDeclaredConstructor()
141 public static boolean canDiscoverWithGetDeclaredConstructors(Class<?> klass, Class<?> args[]) { in canDiscoverWithGetDeclaredConstructors() argument
142 for (Constructor c : klass.getDeclaredConstructors()) { in canDiscoverWithGetDeclaredConstructors()
150 public static boolean canDiscoverWithGetConstructor(Class<?> klass, Class<?> args[]) { in canDiscoverWithGetConstructor() argument
152 klass.getConstructor(args); in canDiscoverWithGetConstructor()
159 public static boolean canDiscoverWithGetConstructors(Class<?> klass, Class<?> args[]) { in canDiscoverWithGetConstructors() argument
160 for (Constructor c : klass.getConstructors()) { in canDiscoverWithGetConstructors()
168 public static boolean canInvokeConstructor(Class<?> klass, Class<?> args[], Object[] initargs) { in canInvokeConstructor() argument
170 Constructor c = klass.getDeclaredConstructor(args); in canInvokeConstructor()
180 public static boolean canUseNewInstance(Class<?> klass) throws IllegalAccessException { in canUseNewInstance() argument
182 klass.newInstance(); in canUseNewInstance()
191 public static boolean canObserveFieldHiddenAccessFlags(Class<?> klass, String name) in canObserveFieldHiddenAccessFlags() argument
193 return (klass.getDeclaredField(name).getModifiers() & getHiddenApiAccessFlags()) != 0; in canObserveFieldHiddenAccessFlags()
196 public static boolean canObserveMethodHiddenAccessFlags(Class<?> klass, String name) in canObserveMethodHiddenAccessFlags() argument
198 return (klass.getDeclaredMethod(name).getModifiers() & getHiddenApiAccessFlags()) != 0; in canObserveMethodHiddenAccessFlags()
201 public static boolean canObserveConstructorHiddenAccessFlags(Class<?> klass, Class<?> args[]) in canObserveConstructorHiddenAccessFlags() argument
203 return (klass.getConstructor(args).getModifiers() & getHiddenApiAccessFlags()) != 0; in canObserveConstructorHiddenAccessFlags()