/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | MethodOverridesTest.java | 30 Method method = StringBuilder.class.getMethod("append", char.class); in testName() local 31 assertEquals("append", method.getName()); in testName() 35 Method method = StringBuilder.class.getMethod("append", char.class); in testParameterTypes() local 37 Arrays.asList(method.getParameterTypes())); in testParameterTypes() 41 Method method = StringBuilder.class.getMethod("append", char.class); in testDeclaringClass() local 42 assertEquals(StringBuilder.class, method.getDeclaringClass()); in testDeclaringClass() 46 Method method = StringBuilder.class.getMethod("append", char.class); in testReturnType() local 47 assertEquals(StringBuilder.class, method.getReturnType()); in testReturnType() 51 Method method = StringBuilder.class.getMethod("append", char.class); in testThrownExceptions() local 52 assertEquals(Collections.<Class<?>>emptyList(), Arrays.asList(method.getExceptionTypes())); in testThrownExceptions() [all …]
|
D | MethodTest.java | 24 Method method = MethodTestHelper.class.getMethod("m1", new Class[0]); in test_getExceptionTypes() local 25 Class[] exceptions = method.getExceptionTypes(); in test_getExceptionTypes() 30 exceptions = method.getExceptionTypes(); in test_getExceptionTypes() 37 Method method = MethodTestHelper.class.getMethod("m2", expectedParameters); in test_getParameterTypes() local 38 Class[] parameters = method.getParameterTypes(); in test_getParameterTypes() 43 parameters = method.getParameterTypes(); in test_getParameterTypes() 105 Method method = Super.class.getDeclaredMethod("a"); in testGetDeclaredMethodReturnsPrivateMethods() local 106 assertEquals(void.class, method.getReturnType()); in testGetDeclaredMethodReturnsPrivateMethods() 130 Method method = anonymous.getClass().getMethod("a"); in testImplementedInterfaceMethodOfAnonymousClass() local 131 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testImplementedInterfaceMethodOfAnonymousClass() [all …]
|
D | GenericExceptionsTest.java | 31 Method method = Thrower.class.getMethod("parameterizedMethod"); in testGenericExceptionsOfMethodsWithTypeParameters() local 33 Arrays.asList(method.getGenericExceptionTypes())); in testGenericExceptionsOfMethodsWithTypeParameters() 37 Method method = Thrower.class.getMethod("genericParameters", List.class); in testGenericExceptionsOfMethodsWithGenericParameters() local 39 Arrays.asList(method.getGenericExceptionTypes())); in testGenericExceptionsOfMethodsWithGenericParameters() 63 Method method = ThrowerT.class.getMethod("throwsTypeVariable"); in testMethodThrowingTypeVariable() local 64 TypeVariable typeVariable = getOnlyValue(method.getGenericExceptionTypes(), in testMethodThrowingTypeVariable() 71 Method method = ThrowerT.class.getMethod("throwsMethodTypeParameter"); in testThrowingMethodTypeParameter() local 72 TypeVariable typeVariable = getOnlyValue(method.getGenericExceptionTypes(), in testThrowingMethodTypeParameter() 79 Method method = ThrowerT.class.getMethod("throwsEverything"); in testThrowingMethodThrowsEverything() local 80 Type[] exceptions = method.getGenericExceptionTypes(); in testThrowingMethodThrowsEverything()
|
D | OldAndroidClassTest.java | 55 Method method = helloClass.getDeclaredMethod("method", (Class[]) null); in testGetDeclaredMethod() local 56 method.invoke(new OldAndroidClassTest(), (Object[]) null); in testGetDeclaredMethod() 61 Method method = helloClass.getDeclaredMethod("methodWithArgs", Object.class); in testGetDeclaredMethodWithArgs() local 65 Object ret = method.invoke(new OldAndroidClassTest(), invokeArgs); in testGetDeclaredMethodWithArgs() 71 Method method = helloClass.getDeclaredMethod("privateMethod", (Class[]) null); in testGetDeclaredMethodPrivate() local 72 method.invoke(new OldAndroidClassTest(), (Object[]) null); in testGetDeclaredMethodPrivate() 128 public void method() { in method() method in OldAndroidClassTest 144 for (Method method : methods) { in testClassGetMethodsNoDupes() 145 String signature = method.toString(); in testClassGetMethodsNoDupes() 193 for (Method method : methods) { in hasMethod() [all …]
|
D | OldGenericReflectionCornerCases.java | 42 Method method = clazz.getDeclaredMethod("wildcardEquality", Pair.class); in testWildcardEquality() local 47 Type[] parameterTypes = method.getGenericParameterTypes(); in testWildcardEquality() 85 Method method = clazz.getDeclaredMethod("wildcardUnEquality", Pair.class); in testWildcardUnEquality() local 90 Type[] parameterTypes = method.getGenericParameterTypes(); in testWildcardUnEquality() 130 Method method = clazz.getDeclaredMethod("multipleBoundedWildcardUnEquality", Pair.class); in testMultipleBoundedWildcardUnEquality() local 147 Type[] parameterTypes = method.getGenericParameterTypes(); in testMultipleBoundedWildcardUnEquality() 182 Method method = clazz.getDeclaredMethod("multipleBoundedWildcardEquality", Pair.class); in testMultipleBoundedWildcard() local 199 Type[] parameterTypes = method.getGenericParameterTypes(); in testMultipleBoundedWildcard()
|
D | OldGenericTypesTest.java | 80 Method method = clazz.getDeclaredMethod("staticMethodGenericType", Object.class); in testStaticMethodGenericType() local 81 Type[] genericParameterTypes = method.getGenericParameterTypes(); in testStaticMethodGenericType() 86 assertEquals(method, ((TypeVariable)parameterType).getGenericDeclaration()); in testStaticMethodGenericType() 93 Method method = clazz.getDeclaredMethod("hidingMethodGenericType", Object.class); in testHidingMethodGenericType() local 94 Type[] genericParameterTypes = method.getGenericParameterTypes(); in testHidingMethodGenericType() 99 assertEquals(method, ((TypeVariable)parameterType).getGenericDeclaration()); in testHidingMethodGenericType() 216 Method method = clazz.getDeclaredMethod("exceptionTest"); in testException() local 217 Type[] genericExceptionTypes = method.getGenericExceptionTypes(); in testException()
|
D | ProxyTest.java | 34 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { 249 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testEquals() 262 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testHashCode() 272 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testToString() 282 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testReturnTypeDoesNotSatisfyAllConstraintsWithLenientCaller() 283 assertEquals(Object.class, method.getReturnType()); in testReturnTypeDoesNotSatisfyAllConstraintsWithLenientCaller() 294 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testReturnTypeDoesNotSatisfyAllConstraintsWithStrictCaller() 295 assertEquals(String.class, method.getReturnType()); in testReturnTypeDoesNotSatisfyAllConstraintsWithStrictCaller() 395 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { in invoke() argument 405 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { in test24846()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
D | GenericMethodsTests.java | 55 private void checkTypeParameter(Method method) { in checkTypeParameter() argument 56 TypeVariable<Method> typeParameter = getTypeParameter(method); in checkTypeParameter() 58 assertEquals(method, typeParameter.getGenericDeclaration()); in checkTypeParameter() 66 private void checkParameterType(Method method) { in checkParameterType() argument 67 TypeVariable<Method> typeParameter = getTypeParameter(method); in checkParameterType() 68 assertLenghtOne(method.getGenericParameterTypes()); in checkParameterType() 69 Type genericParameterType = method.getGenericParameterTypes()[0]; in checkParameterType() 72 assertEquals(method, ((TypeVariable<?>) genericParameterType).getGenericDeclaration()); in checkParameterType() 79 private void checkReturnType(Method method) { in checkReturnType() argument 80 TypeVariable<Method> typeParameter = getTypeParameter(method); in checkReturnType() [all …]
|
D | BoundedGenericMethodsTests.java | 50 private void checkBoundedTypeParameter(Method method) { in checkBoundedTypeParameter() argument 51 TypeVariable<Method> typeParameter = getTypeParameter(method); in checkBoundedTypeParameter() 53 assertEquals(method, typeParameter.getGenericDeclaration()); in checkBoundedTypeParameter() 68 private void parameterType(Method method) { in parameterType() argument 69 TypeVariable<Method> typeParameter = getTypeParameter(method); in parameterType() 70 assertLenghtOne(method.getGenericParameterTypes()); in parameterType() 71 Type genericParameterType = method.getGenericParameterTypes()[0]; in parameterType() 75 assertEquals(method, typeVariable.getGenericDeclaration()); in parameterType() 84 private void checkReturnType(Method method) { in checkReturnType() argument 85 Type genericReturnType = method.getGenericReturnType(); in checkReturnType() [all …]
|
D | WildcardTypeTest.java | 57 private void checkBoundedTypeParameter(Method method) { in checkBoundedTypeParameter() argument 58 TypeVariable<Method> typeParameter = getTypeParameter(method); in checkBoundedTypeParameter() 60 assertEquals(method, typeParameter.getGenericDeclaration()); in checkBoundedTypeParameter() 68 private void checkLowerBoundedParameter(Method method) { in checkLowerBoundedParameter() argument 69 Type genericParameterType = method.getGenericParameterTypes()[0]; in checkLowerBoundedParameter() 83 assertEquals(getTypeParameter(method), lowerBound); in checkLowerBoundedParameter() 89 private void checkUpperBoundedParameter(Method method) { in checkUpperBoundedParameter() argument 90 assertLenghtOne(method.getGenericParameterTypes()); in checkUpperBoundedParameter() 91 Type genericParameterType = method.getGenericParameterTypes()[0]; in checkUpperBoundedParameter() 105 assertEquals(getTypeParameter(method), upperBound); in checkUpperBoundedParameter() [all …]
|
D | ProxyTest.java | 51 public float method(float _number0, float _number1); in method() method 55 public Object invoke(Object proxy, Method method, Object[] args) in invoke() argument 104 public Object invoke(Object proxy, Method method, Object[] args) in test_ProxyLjava_lang_reflect_InvocationHandler() 122 public Object invoke(Object proxy, Method method, Object[] args) in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler() 124 if (method.getName().equals("equals")) in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler() 126 if (method.getName().equals("array")) in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler() 128 if (method.getName().equals("string")) { in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler() 178 float brokenResult = proxyObject.method(2.1f, 5.8f); in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler() 196 public Object invoke(Object proxy, Method method, Object[] args) in test_isProxyClassLjava_lang_Class() 221 public Object invoke(Object proxy, Method method, Object[] args) in test_getInvocationHandlerLjava_lang_Object() [all …]
|
D | TypeVariableTest.java | 48 Method method = clazz.getDeclaredMethod("b"); in testSimpleTypeVariableOnMethod() local 49 TypeVariable<Method>[] typeParameters = method.getTypeParameters(); in testSimpleTypeVariableOnMethod() 52 assertEquals(method, typeVariable.getGenericDeclaration()); in testSimpleTypeVariableOnMethod() 96 Method method = clazz.getDeclaredMethod("e"); in testMultipleTypeVariablesOnMethod() local 98 TypeVariable<?>[] typeParameters = method.getTypeParameters(); in testMultipleTypeVariablesOnMethod() 101 assertEquals(method, typeParameters[0].getGenericDeclaration()); in testMultipleTypeVariablesOnMethod() 104 assertEquals(method, typeParameters[1].getGenericDeclaration()); in testMultipleTypeVariablesOnMethod() 107 assertEquals(method, typeParameters[2].getGenericDeclaration()); in testMultipleTypeVariablesOnMethod()
|
D | MethodTest.java | 372 for (Method method : declaredMethods) { in test_isBridge() 373 if (method.getReturnType().equals(Object.class)) { in test_isBridge() 374 assertTrue("Bridge method not stated as bridge.", method in test_isBridge() 390 for (Method method : declaredMethods) { in test_isSynthetic() 391 if (method.getReturnType().equals(Object.class)) { in test_isSynthetic() 392 assertTrue("Synthetic method not stated as synthetic.", method in test_isSynthetic() 403 Method method = TestMethod.class.getDeclaredMethod( in test_getParameterAnnotations() local 406 Annotation[][] annotations = method.getParameterAnnotations(); in test_getParameterAnnotations() 435 Method method = TestMethod.class.getDeclaredMethod("annotatedMethod"); in test_getDeclaredAnnotations() local 436 Annotation[] declaredAnnotations = method.getDeclaredAnnotations(); in test_getDeclaredAnnotations() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | SerializationTestClass.java | 240 public void method() { in method() method in SerializationTestClass.TestMethodPublic 246 private void method() { in method() method in SerializationTestClass.TestMethodPrivate 251 protected void method() { in method() method in SerializationTestClass.TestMethodProtected 256 strictfp void method() { in method() method in SerializationTestClass.TestMethodStrict 261 static void method() { in method() method in SerializationTestClass.TestMethodStatic 266 final void method() { in method() method in SerializationTestClass.TestMethodFinal 271 synchronized void method() { in method() method in SerializationTestClass.TestMethodSynchronized 276 native void method(); in method() method in SerializationTestClass.TestMethodNative 281 abstract void method(); in method() method in SerializationTestClass.TestMethodAbstractHelper 287 void method() { in method() method in SerializationTestClass.TestMethodAbstract [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | FileIOInterruptTest.java | 189 private void testChannelRead_exceptionWhenAlreadyClosed(ChannelReader.Method method) in testChannelRead_exceptionWhenAlreadyClosed() argument 199 if (method == ChannelReader.Method.READ) { in testChannelRead_exceptionWhenAlreadyClosed() 221 private void testChannelRead_exceptionWhenAlreadyInterrupted(ChannelReader.Method method) in testChannelRead_exceptionWhenAlreadyInterrupted() argument 232 if (method == ChannelReader.Method.READ) { in testChannelRead_exceptionWhenAlreadyInterrupted() 258 private void testChannelRead_exceptionOnCloseWhenBlocked(ChannelReader.Method method) in testChannelRead_exceptionOnCloseWhenBlocked() argument 265 ChannelReader channelReader = new ChannelReader(fileInputChannel, method); in testChannelRead_exceptionOnCloseWhenBlocked() 291 private void testChannelRead_exceptionOnInterrupt(ChannelReader.Method method) throws Exception { in testChannelRead_exceptionOnInterrupt() argument 296 ChannelReader channelReader = new ChannelReader(fileChannel, method); in testChannelRead_exceptionOnInterrupt() 322 private void testChannelWrite_exceptionWhenAlreadyClosed(ChannelWriter.Method method) in testChannelWrite_exceptionWhenAlreadyClosed() argument 331 if (method == ChannelWriter.Method.WRITE) { in testChannelWrite_exceptionWhenAlreadyClosed() [all …]
|
/libcore/support/src/test/java/tests/io/ |
D | MockOs.java | 46 @Override public Object invoke(Object o, Method method, Object[] args) throws Throwable { 48 return method.invoke(delegate, args); 56 @Override public Object invoke(Object proxy, Method method, Object[] args) 58 InvocationHandler handler = getHandlers(method.getName()).poll(); 62 return handler.invoke(proxy, method, args); 115 … @Override public Object invoke(Object proxy, Method method, Object[] args) throws ErrnoException { in enqueueFault() 116 throw new ErrnoException(method.getName(), errno); in enqueueFault()
|
/libcore/luni/src/main/java/java/util/zip/ |
D | ZipOutputStream.java | 267 int method = ze.getMethod(); in putNextEntry() local 268 if (method == -1) { in putNextEntry() 269 method = defaultCompressionMethod; in putNextEntry() 273 if (method == STORED) { in putNextEntry() 310 ze.setMethod(method); in putNextEntry() 317 int flags = (method == STORED) ? 0 : ZipFile.GPBF_DATA_DESCRIPTOR_FLAG; in putNextEntry() 324 writeShort(out, method); in putNextEntry() 331 if (method == STORED) { in putNextEntry() 382 public void setMethod(int method) { in setMethod() argument 383 if (method != STORED && method != DEFLATED) { in setMethod() [all …]
|
/libcore/luni/src/main/java/java/net/ |
D | HttpURLConnection.java | 280 protected String method = "GET"; field in HttpURLConnection 598 return method; in getRequestMethod() 672 public void setRequestMethod(String method) throws ProtocolException { in setRequestMethod() argument 677 if (permittedUserMethod.equals(method)) { in setRequestMethod() 680 this.method = permittedUserMethod; in setRequestMethod() 685 throw new ProtocolException("Unknown method '" + method + "'; must be one of " + in setRequestMethod()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | AnnotatedElementBenchmark.java | 30 private Method method; field in AnnotatedElementBenchmark 35 method = Type.class.getMethod("method", String.class); in setUp() 55 method.getAnnotations(); in timeGetMethodAnnotations() 61 method.getParameterAnnotations(); in timeGetParameterAnnotations() 79 method.getAnnotation(Marker.class); in timeGetMethodAnnotation() 97 method.isAnnotationPresent(Marker.class); in timeIsMethodAnnotationPresent() 154 @Marker public void method(@Marker String parameter) {} in method() method in AnnotatedElementBenchmark.Type
|
/libcore/libart/src/main/java/java/lang/reflect/ |
D | Proxy.java | 316 for (Method method : methods) { in validateReturnTypes() 317 if (vs == null || !vs.equalNameAndParameters(method)) { in validateReturnTypes() 318 vs = method; // this has a different name or parameters in validateReturnTypes() 321 Class<?> returnType = method.getReturnType(); in validateReturnTypes() 326 vs = method; // the new return type is a subtype; use it instead in validateReturnTypes() 329 + "return types:\n " + vs + "\n " + method); in validateReturnTypes() 346 Method method = methods.get(i); in deduplicateAndGetExceptions() local 347 Class<?>[] exceptionTypes = method.getExceptionTypes(); in deduplicateAndGetExceptions() 349 if (i > 0 && Method.ORDER_BY_SIGNATURE.compare(method, methods.get(i - 1)) == 0) { in deduplicateAndGetExceptions() 395 static Object invoke(Proxy proxy, ArtMethod method, Object[] args) throws Throwable { in invoke() argument [all …]
|
/libcore/luni/src/main/java/java/lang/ |
D | Void.java | 40 Method method = Runnable.class.getMethod("run", EmptyArray.CLASS); in lookupType() local 41 return (Class<Void>) method.getReturnType(); in lookupType()
|
D | StackTraceElement.java | 60 public StackTraceElement(String cls, String method, String file, int line) { in StackTraceElement() argument 63 } else if (method == null) { in StackTraceElement() 67 methodName = method; in StackTraceElement()
|
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
D | PSKKeyManagerProxy.java | 77 public final Object invoke(Object proxy, Method method, Object[] args) throws Throwable { in invoke() argument 78 String methodName = method.getName(); in invoke() 79 Class<?>[] parameterTypes = method.getParameterTypes(); in invoke() 101 throw new IllegalArgumentException("Unexpected method: " + method); in invoke()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/support/ |
D | MethodLogger.java | 41 public void add(String method, Object ... args) { in add() argument 45 methods.add(method); in add()
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | AnnotationFactory.java | 276 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { in invoke() argument 277 String name = method.getName(); in invoke() 278 Class[] params = method.getParameterTypes(); in invoke() 296 if (element == null || !method.equals(element.definingMethod)) { in invoke() 297 throw new IllegalArgumentException(method.toString()); in invoke() 308 throw new IllegalArgumentException("Invalid method for annotation type: " + method); in invoke()
|