Home
last modified time | relevance | path

Searched refs:method (Results 1 – 25 of 82) sorted by relevance

1234

/libcore/luni/src/test/java/libcore/java/lang/reflect/
DMethodOverridesTest.java30 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 …]
DMethodTest.java33 Method method = MethodTestHelper.class.getMethod("m1", new Class[0]); in test_getExceptionTypes() local
34 Class[] exceptions = method.getExceptionTypes(); in test_getExceptionTypes()
39 exceptions = method.getExceptionTypes(); in test_getExceptionTypes()
46 Method method = MethodTestHelper.class.getMethod("m1", expectedParameters); in test_getParameterTypes() local
47 assertEquals(0, method.getParameterTypes().length); in test_getParameterTypes()
50 method = MethodTestHelper.class.getMethod("m2", expectedParameters); in test_getParameterTypes()
51 Class[] parameters = method.getParameterTypes(); in test_getParameterTypes()
56 parameters = method.getParameterTypes(); in test_getParameterTypes()
63 Method method = MethodTestHelper.class.getMethod("m1", expectedParameters); in test_getParameterCount() local
64 assertEquals(0, method.getParameterCount()); in test_getParameterCount()
[all …]
DParameterTest.java112 Method method = SingleParameter.class.getDeclaredMethod("oneParameter", String.class); in testSingleParameterMethod() local
113 checkSingleStringParameter(method); in testSingleParameterMethod()
136 Method method = clazz.getDeclaredMethod("oneParameter", String.class); in testSingleParameterMethod_withMetadata() local
137 checkSingleStringParameter_withMetadata(method); in testSingleParameterMethod_withMetadata()
168 Method method = GenericParameter.class.getDeclaredMethod( in testGenericParameterMethod() local
170 checkGenericParameter(method); in testGenericParameterMethod()
195 Method method = clazz.getDeclaredMethod("genericParameter", Function.class); in testGenericParameterMethod_withMetadata() local
196 checkGenericParameter_withMetadata(method); in testGenericParameterMethod_withMetadata()
229 Method method = TwoParameters.class.getDeclaredMethod( in testTwoParameterMethod() local
231 checkTwoParameters(method); in testTwoParameterMethod()
[all …]
DGenericExceptionsTest.java31 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()
DOldAndroidClassTest.java55 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 …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DGenericMethodsTests.java55 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 …]
DBoundedGenericMethodsTests.java50 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 …]
DWildcardTypeTest.java57 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()
85 assertEquals(getTypeParameter(method), lowerBound); in checkLowerBoundedParameter()
91 private void checkUpperBoundedParameter(Method method) { in checkUpperBoundedParameter() argument
92 assertLenghtOne(method.getGenericParameterTypes()); in checkUpperBoundedParameter()
93 Type genericParameterType = method.getGenericParameterTypes()[0]; in checkUpperBoundedParameter()
109 assertEquals(getTypeParameter(method), upperBound); in checkUpperBoundedParameter()
[all …]
DProxyTest.java51 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 …]
DTypeVariableTest.java50 Method method = clazz.getDeclaredMethod("b"); in testSimpleTypeVariableOnMethod() local
51 TypeVariable<Method>[] typeParameters = method.getTypeParameters(); in testSimpleTypeVariableOnMethod()
54 assertEquals(method, typeVariable.getGenericDeclaration()); in testSimpleTypeVariableOnMethod()
107 Method method = clazz.getDeclaredMethod("e"); in testMultipleTypeVariablesOnMethod() local
109 TypeVariable<?>[] typeParameters = method.getTypeParameters(); in testMultipleTypeVariablesOnMethod()
112 assertEquals(method, typeParameters[0].getGenericDeclaration()); in testMultipleTypeVariablesOnMethod()
117 assertEquals(method, typeParameters[1].getGenericDeclaration()); in testMultipleTypeVariablesOnMethod()
122 assertEquals(method, typeParameters[2].getGenericDeclaration()); in testMultipleTypeVariablesOnMethod()
/libcore/ojluni/src/main/java/sun/net/
DProgressSource.java41 private String method; field in ProgressSource
62 public ProgressSource(URL url, String method) { in ProgressSource() argument
63 this(url, method, -1); in ProgressSource()
69 public ProgressSource(URL url, String method, long expected) { in ProgressSource() argument
71 this.method = method; in ProgressSource()
108 return method; in getMethod()
207 return getClass().getName() + "[url=" + url + ", method=" + method + ", state=" + state in toString()
DProgressEvent.java42 private String method; field in ProgressEvent
53 …public ProgressEvent(ProgressSource source, URL url, String method, String contentType, ProgressSo… in ProgressEvent() argument
56 this.method = method; in ProgressEvent()
76 return method; in getMethod()
110 return getClass().getName() + "[url=" + url + ", method=" + method + ", state=" + state in toString()
/libcore/ojluni/src/main/java/sun/security/x509/
DAccessDescription.java103 String method = null; in toString() local
105 method = "caIssuers"; in toString()
107 method = "caRepository"; in toString()
109 method = "timeStamping"; in toString()
111 method = "ocsp"; in toString()
113 method = accessMethod.toString(); in toString()
115 return ("\n accessMethod: " + method + in toString()
/libcore/luni/src/test/java/libcore/java/lang/reflect/parameter/
DMetadataVariations.smali24 .method public abstract badAccessModifier(Ljava/lang/String;)V
33 .end method
35 .method public abstract badlyFormedAnnotation(Ljava/lang/String;)V
41 .end method
43 .method public abstract emptyMethodParametersAnnotation()V
48 .end method
50 .method public abstract emptyName(Ljava/lang/String;)V
59 .end method
61 .method public abstract manyParameters(IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII…
668 .end method
[all …]
DParameterMetadataTestClasses.smali42 .method static synthetic -wrap0(Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses;)…
50 .end method
52 .method public constructor <init>()V
60 .end method
62 .method private outerClassMethod()Ljava/lang/String;
70 .end method
74 .method synthetic -libcore_java_lang_reflect_parameter_ParameterMetadataTestClasses-mthref-0()Ljava…
84 .end method
86 .method public getAnonymousClassWith1ParameterConstructor()Ljava/lang/Class;
108 .end method
[all …]
DParameterMetadataTestClasses$NonIdenticalParameters.smali35 .method constructor <init>()V
43 .end method
47 .method method0(Ljava/lang/String;)V
61 .end method
63 .method method1(Ljava/lang/String;)V
77 .end method
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DSerializationTestClass.java240 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/
DFileIOInterruptTest.java189 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/luni/src/test/java/libcore/java/lang/reflect/annotations/
DMethodTest.java38 public void method(String parameter1, String parameter2) {} in method() method in MethodTest.Type
42 Method method = Type.class.getMethod("method", String.class, String.class); in testMethodAnnotations() local
43 checkAnnotatedElementPresentMethods(method, AnnotationB.class, AnnotationC.class); in testMethodAnnotations()
89 Method method = c.getDeclaredMethod(methodName); in checkDeclaredAnnotation() local
92 assertIsAnnotationPresent(method, annotationType, expectedAnnotationString != null); in checkDeclaredAnnotation()
95 assertGetDeclaredAnnotation(method, annotationType, expectedAnnotationString); in checkDeclaredAnnotation()
125 Method method = c.getDeclaredMethod(methodName); in assertGetDeclaredAnnotationsByType() local
127 method, annotationType, expectedAnnotationStrings); in assertGetDeclaredAnnotationsByType()
157 Method method = c.getDeclaredMethod(methodName); in assertGetAnnotationsByType() local
159 method, annotationType, expectedAnnotationStrings); in assertGetAnnotationsByType()
/libcore/support/src/test/java/tests/io/
DMockOs.java46 @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/ojluni/src/main/java/java/net/
DHttpURLConnection.java281 protected String method = "GET"; field in HttpURLConnection
625 public void setRequestMethod(String method) throws ProtocolException { in setRequestMethod() argument
635 if (methods[i].equals(method)) { in setRequestMethod()
636 if (method.equals("TRACE")) { in setRequestMethod()
642 this.method = method; in setRequestMethod()
646 throw new ProtocolException("Invalid HTTP method: " + method); in setRequestMethod()
655 return method; in getRequestMethod()
/libcore/ojluni/src/main/java/java/util/zip/
DZipEntry.java56 int method = -1; // compression method field in ZipEntry
87 this.method = compressionMethod; in ZipEntry()
151 method = e.method; in ZipEntry()
439 public void setMethod(int method) { in setMethod() argument
440 if (method != STORED && method != DEFLATED) { in setMethod()
443 this.method = method; in setMethod()
453 return method; in getMethod()
DZipOutputStream.java79 private int method = DEFLATED; field in ZipOutputStream
87 switch (e.method) { in version()
164 public void setMethod(int method) { in setMethod() argument
165 if (method != DEFLATED && method != STORED) { in setMethod()
168 this.method = method; in setMethod()
201 if (e.method == -1) { in putNextEntry()
202 e.method = method; // use default method in putNextEntry()
206 switch (e.method) { in putNextEntry()
253 switch (e.method) { in closeEntry()
331 switch (entry.method) { in write()
[all …]
/libcore/luni/src/test/java/libcore/io/
DBlockGuardOsTest.java134 for (Method method : BlockGuardOs.class.getDeclaredMethods()) { in test_checkNewMethodsInPosix()
135 String methodNameAndParameters = getMethodNameAndParameters(method.toString()); in test_checkNewMethodsInPosix()
141 for (Method method : Os.class.getDeclaredMethods()) { in test_checkNewMethodsInPosix()
142 String methodSignature = method.toString(); in test_checkNewMethodsInPosix()
/libcore/benchmarks/src/benchmarks/regression/
DAnnotatedElementBenchmark.java29 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()
215 @Marker public void method(@Marker String parameter) {} in method() method in AnnotatedElementBenchmark.Type

1234