Searched defs:method (Results 1 - 25 of 34) sorted by relevance

12

/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/test/java/libcore/java/lang/reflect/
H A DMissingClassesTest.java56 loadableClass.getDeclaredMethod("method", Unloadable.class);
72 void method(Unloadable unloadable) {} method in class:MissingClassesTest.Loadable
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 DClassLoaderReflectionTest.java115 Method method = fClass.getDeclaredMethod("method", bClass, List.class);
116 assertParameterizedType(method.getGenericReturnType(), bClass, String.class);
120 Method method = fClass.getDeclaredMethod("method", bClass, List.class);
121 Type[] types = method.getGenericParameterTypes();
164 B<String> method(B<String> parameter, List<A> anotherParameter) { method in class:ClassLoaderReflectionTest.F
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 DProxyTest.java34 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
249 @Override public Object invoke(Object proxy, Method method, Object[] args) {
262 @Override public Object invoke(Object proxy, Method method, Object[] args) {
272 @Override public Object invoke(Object proxy, Method method, Object[] args) {
282 @Override public Object invoke(Object proxy, Method method, Object[] args) {
283 assertEquals(Object.class, method.getReturnType());
294 @Override public Object invoke(Object proxy, Method method, Object[] args) {
295 assertEquals(String.class, method.getReturnType());
395 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { argument
405 public Object invoke(Object proxy, Method method, Objec
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
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.
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 DProxyTest.java36 * When multiple interfaces define the same method, the list of thrown
38 * other method:
51 public float method(float _number0, float _number1); method in interface:ProxyTest.Broken1
55 public Object invoke(Object proxy, Method method, Object[] args) argument
104 public Object invoke(Object proxy, Method method, Object[] args)
122 public Object invoke(Object proxy, Method method, Object[] args)
124 if (method.getName().equals("equals"))
126 if (method.getName().equals("array"))
128 if (method.getName().equals("string")) {
178 float brokenResult = proxyObject.method(2.
303 invoke(Object object, Method method, Object[] args) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/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/luni/src/main/native/
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);
H A Djava_io_ObjectStreamClass.cpp36 static jobject ObjectStreamClass_getMethodSignature(JNIEnv* env, jclass, jobject method) { argument
37 return getSignature(env, JniConstants::methodClass, method);
/libcore/luni/src/test/java/libcore/javax/net/ssl/
H A DPSKKeyManagerProxy.java77 public final Object invoke(Object proxy, Method method, Object[] args) throws Throwable { argument
78 String methodName = method.getName();
79 Class<?>[] parameterTypes = method.getParameterTypes();
101 throw new IllegalArgumentException("Unexpected method: " + method);
/libcore/luni/src/main/java/java/lang/
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/luni/src/main/java/libcore/reflect/
H A DAnnotationFactory.java103 * New instances should not be created directly, use factory method
269 * Processes a method invocation request to this annotation instance.
273 * @throws IllegalArgumentException If the specified method is none of the above
276 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { argument
277 String name = method.getName();
278 Class[] params = method.getParameterTypes();
296 if (element == null || !method.equals(element.definingMethod)) {
297 throw new IllegalArgumentException(method.toString());
308 throw new IllegalArgumentException("Invalid method for annotation type: " + method);
[all...]
H A DAnnotationAccess.java211 * @param element a class, a field, a method or a constructor.
329 public static Object getDefaultValue(Method method) { argument
341 Class<?> annotationClass = method.getDeclaringClass();
356 int methodNameIndex = dex.findStringIndex(method.getName());
360 Class<?> returnType = method.getReturnType();
372 * defined in a method or constructor, this is not transitive.
426 * @param element a class, a field, a method or a constructor.
449 * @param element a method or a constructor.
655 Method method;
657 method
[all...]
/libcore/benchmarks/src/benchmarks/regression/
H A DAnnotatedElementBenchmark.java30 private Method method; field in class:AnnotatedElementBenchmark
35 method = Type.class.getMethod("method", String.class);
39 // get annotations by member type and method
55 method.getAnnotations();
61 method.getParameterAnnotations();
79 method.getAnnotation(Marker.class);
97 method.isAnnotationPresent(Marker.class);
154 @Marker public void method(@Marker String parameter) {} method in class:AnnotatedElementBenchmark.Type
/libcore/libart/src/main/java/java/lang/reflect/
H A DProxy.java32 * A proxy class implements a declared set of interfaces and delegates method
69 /** The invocation handler on which the method calls are dispatched. */
90 * is relevant. Invocations of this method with the same interfaces but
215 * the invocation handler that handles the dispatched method
316 for (Method method : methods) {
317 if (vs == null || !vs.equalNameAndParameters(method)) {
318 vs = method; // this has a different name or parameters
321 Class<?> returnType = method.getReturnType();
326 vs = method; // the new return type is a subtype; use it instead
329 + "return types:\n " + vs + "\n " + method);
395 invoke(Proxy proxy, ArtMethod method, Object[] args) argument
[all...]
/libcore/luni/src/main/java/java/util/zip/
H A DZipOutputStream.java108 * stream. If the stream is already closed this method does nothing.
266 // Did this ZipEntry specify a method, or should we use the default?
267 int method = ze.getMethod();
268 if (method == -1) {
269 method = defaultCompressionMethod;
272 // If the method is STORED, check that the ZipEntry was configured appropriately.
273 if (method == STORED) {
310 ze.setMethod(method);
317 int flags = (method == STORED) ? 0 : ZipFile.GPBF_DATA_DESCRIPTOR_FLAG;
324 writeShort(out, method);
382 setMethod(int method) argument
[all...]
/libcore/luni/src/test/java/libcore/java/io/
H A DSerializationTest.java374 public Object invoke(Object proxy, Method method, Object[] args) { argument
406 public Object invoke(Object proxy, Method method, Object[] args) { argument
/libcore/luni/src/test/java/libcore/java/nio/channels/
H A DFileIOInterruptTest.java189 private void testChannelRead_exceptionWhenAlreadyClosed(ChannelReader.Method method) argument
199 if (method == ChannelReader.Method.READ) {
221 private void testChannelRead_exceptionWhenAlreadyInterrupted(ChannelReader.Method method) argument
232 if (method == ChannelReader.Method.READ) {
258 private void testChannelRead_exceptionOnCloseWhenBlocked(ChannelReader.Method method) argument
265 ChannelReader channelReader = new ChannelReader(fileInputChannel, method);
291 private void testChannelRead_exceptionOnInterrupt(ChannelReader.Method method) throws Exception { argument
296 ChannelReader channelReader = new ChannelReader(fileChannel, method);
322 private void testChannelWrite_exceptionWhenAlreadyClosed(ChannelWriter.Method method) argument
331 if (method
353 testChannelWrite_exceptionWhenAlreadyInterrupted(ChannelWriter.Method method) argument
390 testChannelWrite_exceptionOnCloseWhenBlocked(ChannelWriter.Method method) argument
424 testChannelWrite_exceptionOnInterrupt(ChannelWriter.Method method) argument
531 private final Method method; field in class:FileIOInterruptTest.ChannelReader
536 ChannelReader(FileChannel channel, Method method) argument
576 private final Method method; field in class:FileIOInterruptTest.ChannelWriter
581 ChannelWriter(FileChannel channel, Method method) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DSerializationStressTest4.java64 // Test for method void
96 // Test for method void
129 // Test for method void
162 // Test for method void
191 // Test for method void
230 // Test for method void
281 // Test for method void
309 // Test for method void
351 // Test for method void
380 // Test for method voi
1557 invoke(Object proxy, Method method, Object[] args) argument
[all...]
/libcore/luni/src/main/java/java/net/
H A DHttpURLConnection.java46 * #getInputStream()}. If the response has no body, that method returns an
138 * number of bytes transmitted, you cannot use that method to predict how many
219 * <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 = "GET"; field in class:HttpURLConnection
589 * Returns the request method which will be used to make the request to the
593 * @return the request method string.
594 * @see #method
598 return method;
662 * This method ca
672 setRequestMethod(String method) argument
[all...]

Completed in 568 milliseconds

12