Searched refs:method (Results 1 - 25 of 44) sorted by relevance

12

/libcore/luni/src/test/java/libcore/java/lang/reflect/
H A DMethodOverridesTest.java30 Method method = StringBuilder.class.getMethod("append", char.class);
31 assertEquals("append", method.getName());
35 Method method = StringBuilder.class.getMethod("append", char.class);
37 Arrays.asList(method.getParameterTypes()));
41 Method method = StringBuilder.class.getMethod("append", char.class);
42 assertEquals(StringBuilder.class, method.getDeclaringClass());
46 Method method = StringBuilder.class.getMethod("append", char.class);
47 assertEquals(StringBuilder.class, method.getReturnType());
51 Method method = StringBuilder.class.getMethod("append", char.class);
52 assertEquals(Collections.<Class<?>>emptyList(), Arrays.asList(method
160 signature(Method method) argument
[all...]
H A DGenericExceptionsTest.java31 Method method = Thrower.class.getMethod("parameterizedMethod");
33 Arrays.asList(method.getGenericExceptionTypes()));
37 Method method = Thrower.class.getMethod("genericParameters", List.class);
39 Arrays.asList(method.getGenericExceptionTypes()));
63 Method method = ThrowerT.class.getMethod("throwsTypeVariable");
64 TypeVariable typeVariable = getOnlyValue(method.getGenericExceptionTypes(),
71 Method method = ThrowerT.class.getMethod("throwsMethodTypeParameter");
72 TypeVariable typeVariable = getOnlyValue(method.getGenericExceptionTypes(),
79 Method method = ThrowerT.class.getMethod("throwsEverything");
80 Type[] exceptions = method
[all...]
H A DMethodTest.java60 Method method = MethodTestHelper.class.getMethod("m1", new Class[0]);
61 Class[] exceptions = method.getExceptionTypes();
66 exceptions = method.getExceptionTypes();
73 Method method = MethodTestHelper.class.getMethod("m2", expectedParameters);
74 Class[] parameters = method.getParameterTypes();
79 parameters = method.getParameterTypes();
141 Method method = Super.class.getDeclaredMethod("a");
142 assertEquals(void.class, method.getReturnType());
166 Method method = anonymous.getClass().getMethod("a");
167 assertEquals(anonymous.getClass(), method
[all...]
H A DOldAndroidClassTest.java55 Method method = helloClass.getDeclaredMethod("method", (Class[]) null);
56 method.invoke(new OldAndroidClassTest(), (Object[]) null);
61 Method method = helloClass.getDeclaredMethod("methodWithArgs", Object.class);
65 Object ret = method.invoke(new OldAndroidClassTest(), invokeArgs);
71 Method method = helloClass.getDeclaredMethod("privateMethod", (Class[]) null);
72 method.invoke(new OldAndroidClassTest(), (Object[]) null);
101 helloClass.getMethod("method", (Class[]) null);
105 helloClass.getMethod("method", argTypes);
128 public void method() { method in class:OldAndroidClassTest
[all...]
H A DAnnotationsTest.java53 Method method = Type.class.getMethod("method", String.class, String.class);
54 assertAnnotatedElement(method, AnnotationB.class, AnnotationC.class);
58 Method method = Type.class.getMethod("method", String.class, String.class);
59 Annotation[][] parameterAnnotations = method.getParameterAnnotations();
84 @AnnotationB @AnnotationC public void method(@AnnotationB @AnnotationD String parameter1, method in class:AnnotationsTest.Type
H A DMissingClassesTest.java56 loadableClass.getDeclaredMethod("method", Unloadable.class);
72 void method(Unloadable unloadable) {} method in class:MissingClassesTest.Loadable
H A DOldGenericReflectionCornerCases.java42 Method method = clazz.getDeclaredMethod("wildcardEquality", Pair.class);
47 Type[] parameterTypes = method.getGenericParameterTypes();
85 Method method = clazz.getDeclaredMethod("wildcardUnEquality", Pair.class);
90 Type[] parameterTypes = method.getGenericParameterTypes();
130 Method method = clazz.getDeclaredMethod("multipleBoundedWildcardUnEquality", Pair.class);
147 Type[] parameterTypes = method.getGenericParameterTypes();
182 Method method = clazz.getDeclaredMethod("multipleBoundedWildcardEquality", Pair.class);
199 Type[] parameterTypes = method.getGenericParameterTypes();
H A DOldGenericTypesTest.java80 Method method = clazz.getDeclaredMethod("staticMethodGenericType", Object.class);
81 Type[] genericParameterTypes = method.getGenericParameterTypes();
86 assertEquals(method, ((TypeVariable)parameterType).getGenericDeclaration());
93 Method method = clazz.getDeclaredMethod("hidingMethodGenericType", Object.class);
94 Type[] genericParameterTypes = method.getGenericParameterTypes();
99 assertEquals(method, ((TypeVariable)parameterType).getGenericDeclaration());
203 //method
216 Method method = clazz.getDeclaredMethod("exceptionTest");
217 Type[] genericExceptionTypes = method.getGenericExceptionTypes();
226 //method
[all...]
/libcore/luni/src/test/java/tests/api/java/lang/reflect/
H A DBoundedGenericMethodsTests.java47 * @param method
48 * the declaring method
50 private void checkBoundedTypeParameter(Method method) { argument
51 TypeVariable<Method> typeParameter = getTypeParameter(method);
53 assertEquals(method, typeParameter.getGenericDeclaration());
62 * Tests whether the specified method declares a parameter with the type of
65 * @param method
66 * the declaring method
68 private void parameterType(Method method) { argument
69 TypeVariable<Method> typeParameter = getTypeParameter(method);
84 checkReturnType(Method method) argument
[all...]
H A DGenericMethodsTests.java52 * Tests whether the specified method declares a type parameter T.
53 * @param method the method
55 private void checkTypeParameter(Method method) { argument
56 TypeVariable<Method> typeParameter = getTypeParameter(method);
58 assertEquals(method, typeParameter.getGenericDeclaration());
62 * Tests whether the specified method declares a parameter with the
64 * @param method the method
66 private void checkParameterType(Method method) { argument
79 checkReturnType(Method method) argument
[all...]
H A DWildcardTypeTest.java55 * @param method the declaring method
57 private void checkBoundedTypeParameter(Method method) { argument
58 TypeVariable<Method> typeParameter = getTypeParameter(method);
60 assertEquals(method, typeParameter.getGenericDeclaration());
68 private void checkLowerBoundedParameter(Method method) { argument
69 Type genericParameterType = method.getGenericParameterTypes()[0];
83 assertEquals(getTypeParameter(method), lowerBound);
89 private void checkUpperBoundedParameter(Method method) { argument
90 assertLenghtOne(method
109 checkReturnType(Method method) argument
[all...]
H A DTypeVariableTest.java48 Method method = clazz.getDeclaredMethod("b");
49 TypeVariable<Method>[] typeParameters = method.getTypeParameters();
52 assertEquals(method, typeVariable.getGenericDeclaration());
96 Method method = clazz.getDeclaredMethod("e");
98 TypeVariable<?>[] typeParameters = method.getTypeParameters();
101 assertEquals(method, typeParameters[0].getGenericDeclaration());
104 assertEquals(method, typeParameters[1].getGenericDeclaration());
107 assertEquals(method, typeParameters[2].getGenericDeclaration());
H A DProxyTest.java33 * When multiple interfaces define the same method, the list of thrown
35 * other method:
48 public float method(float _number0, float _number1); method in interface:ProxyTest.Broken1
52 public Object invoke(Object proxy, Method method, Object[] args) argument
101 public Object invoke(Object proxy, Method method, Object[] args)
118 public Object invoke(Object proxy, Method method, Object[] args)
120 if (method.getName().equals("equals"))
122 if (method.getName().equals("array"))
124 if (method.getName().equals("string")) {
190 float brokenResult = proxyObject.method(2.
306 invoke(Object object, Method method, Object[] args) argument
[all...]
H A DGenericReflectionTestsBase.java27 * Returns the type parameter of the declaring method.
29 * @param method
30 * the declaring method
31 * @return the type parameter of the method
33 public TypeVariable<Method> getTypeParameter(Method method) { argument
34 TypeVariable<Method>[] typeParameters = method.getTypeParameters();
43 * @param method
44 * the declaring method.
45 * @return the type parameter of the method.
/libcore/luni/src/main/java/java/lang/reflect/
H A DInvocationHandler.java28 * Handles the method which was originally invoked on the proxy instance. A
32 * public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
33 * //do some processing before the method invocation
35 * //invoke the method
36 * Object result = method.invoke(proxy, args);
38 * //do some processing after the method invocation
43 * the proxy instance on which the method was invoked
44 * @param method
45 * the method invoked on the proxy instance
48 * method, o
59 invoke(Object proxy, Method method, Object[] args) argument
[all...]
/libcore/luni/src/main/java/java/lang/
H A DVoid.java40 Method method = Runnable.class.getMethod("run", EmptyArray.CLASS);
41 return (Class<Void>) method.getReturnType();
H A DStackTraceElement.java49 * @param method
50 * the name of the method where execution is at.
56 * method.
58 * if {@code cls} or {@code method} is {@code null}.
60 public StackTraceElement(String cls, String method, String file, int line) { argument
63 } else if (method == null) {
64 throw new NullPointerException("method == null");
67 methodName = method;
86 * <li>the method names of this stack trace element and of {@code obj} must
88 * <li>the class, method an
[all...]
/libcore/support/src/test/java/tests/io/
H A 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 {
116 throw new ErrnoException(method.getName(), errno);
/libcore/luni/src/main/java/java/net/
H A DHttpURLConnection.java47 * #getInputStream()}. If the response has no body, that method returns an
139 * number of bytes transmitted, you cannot use that method to predict how many
220 * <p>{@code HttpURLConnection} uses the {@code GET} method by default. It will
277 * The HTTP request method of this {@code HttpURLConnection}. The default
280 protected String method = HttpEngine.GET; field in class:HttpURLConnection
581 * Returns the request method which will be used to make the request to the
585 * @return the request method string.
586 * @see #method
590 return method;
654 * This method ca
664 setRequestMethod(String method) argument
[all...]
/libcore/luni/src/test/java/tests/api/org/xml/sax/support/
H A DMethodLogger.java23 * A simple helper class that logs method calls by storing method names and
39 * Adds a method call with a variable list of arguments.
41 public void add(String method, Object ... args) { argument
45 methods.add(method);
50 * Returns the number of method invoked so far.
57 * Returns the method name stored at the given index.
64 * Returns the name of the last method that was invoked. Returns null if no
65 * method calls have been logged so far.
80 * Returns the argument array of the last method tha
[all...]
/libcore/dalvik/src/main/java/dalvik/annotation/
H A DTestTargetNew.java26 * specifies a single method target for the test (but can be used multiple
35 * Specifies the name of the API method that is being tested. This field
37 * class rather than a concrete API method.
39 String method() default "";
42 * Specifies the signature of the API method that is being tested, in terms
48 * Specifies the class to which the tested method belongs. If this value is
55 * Specifies the level of coverage the tested API method has.
61 * if something is NOT covered by the test method.
/libcore/luni/src/test/java/tests/api/java/io/
H A DSerializationTestClass.java238 public void method() { method in class:SerializationTestClass.TestMethodPublic
244 private void method() { method in class:SerializationTestClass.TestMehodPrivate
249 protected void method() { method in class:SerializationTestClass.TestMethodProtected
254 strictfp void method() { method in class:SerializationTestClass.TestMethodStrict
259 static void method() { method in class:SerializationTestClass.TestMethodStatic
264 final void method() { method in class:SerializationTestClass.TestMethodFinal
269 synchronized void method() { method in class:SerializationTestClass.TestMethodSynchronized
274 native void method(); method in class:SerializationTestClass.TestMethodNative
279 abstract void method(); method in class:SerializationTestClass.TestMethodAbstractHelper
285 void method() { method in class:SerializationTestClass.TestMethodAbstract
292 public void method(boolean z, byte b, char c, short s, int i, float f, method in class:SerializationTestClass.TestMethodSignature
[all...]
/libcore/luni/src/main/java/libcore/net/http/
H A DHttpURLConnectionImpl.java51 * header fields, request method, etc.) are immutable. Test the {@code
201 throw new ProtocolException("method does not support a request body: " + method);
244 if (method == HttpEngine.GET) {
245 // they are requesting a stream to write to. This implies a POST method
246 method = HttpEngine.POST;
247 } else if (method != HttpEngine.POST && method != HttpEngine.PUT) {
248 // If the request method is neither POST nor PUT, then you're not writing
249 throw new ProtocolException(method
263 newHttpEngine(String method, RawHeaders requestHeaders, HttpConnection connection, RetryableOutputStream requestBody) argument
[all...]
/libcore/luni/src/main/native/
H A Djava_io_ObjectStreamClass.cpp36 static jobject ObjectStreamClass_getMethodSignature(JNIEnv* env, jclass, jobject method) { argument
37 return getSignature(env, JniConstants::methodClass, method);
H A Djava_util_regex_Pattern.cpp66 static jmethodID method = env->GetMethodID(JniConstants::patternSyntaxExceptionClass, local
70 jobject exception = env->NewObject(exceptionClass, method, message, pattern, error.offset);

Completed in 432 milliseconds

12