Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getElementTypeOfCollectionFromReturnType (0.6 sec)

  1. src/test/java/org/codelibs/core/lang/MethodUtilTest.java

            Method m = Baz.class.getMethod("rawList", List.class);
            assertThat(MethodUtil.getElementTypeOfCollectionFromReturnType(m), is(nullValue()));
    
            m = Baz.class.getMethod("genericList", List.class);
            assertThat(MethodUtil.getElementTypeOfCollectionFromReturnType(m), is(sameClass(String.class)));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 5.5K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/lang/MethodUtil.java

         *
         * @param method
         *            The method. Cannot be {@literal null}
         * @return The element type of the parameterized collection
         */
        public static Class<?> getElementTypeOfCollectionFromReturnType(final Method method) {
            assertArgumentNotNull("method", method);
    
            final Type returnType = method.getGenericReturnType();
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 12.6K bytes
    - Viewed (0)
Back to top