Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for getElementTypeOfCollection (0.14 sec)

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

            assertThat(FieldUtil.getElementTypeOfCollection(Baz.class.getField("collectionOfRawtype")), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        public void testGetElementTypeOfCollection() throws Exception {
            assertEquals(String.class, FieldUtil.getElementTypeOfCollection(Baz.class.getField("collectionOfString")));
        }
    
        /**
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/lang/FieldUtil.java

         * @return コレクションの要素型
         */
        public static Class<?> getElementTypeOfCollection(final Field field) {
            assertArgumentNotNull("field", field);
    
            final Type type = field.getGenericType();
            return GenericsUtil.getRawClass(GenericsUtil.getElementTypeOfCollection(type));
        }
    
        /**
         * パラメタ化されたマップ型のフィールドのキー型を返します。
         *
         * @param field
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/lang/MethodUtil.java

            assertArgumentNotNull("method", method);
    
            final Type[] parameterTypes = method.getGenericParameterTypes();
            return GenericsUtil.getRawClass(GenericsUtil.getElementTypeOfCollection(parameterTypes[position]));
        }
    
        /**
         * 指定されたメソッドの戻り値型として宣言されているパラメタ化されたコレクションの要素型を返します。
         *
         * @param method
         *            メソッド。{@literal null}であってはいけません
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/lang/GenericsUtil.java

         * </p>
         *
         * @param type
         *            パラメータ化された{@link List}
         * @return パラメータ化された{@link List}の要素型
         */
        public static Type getElementTypeOfCollection(final Type type) {
            if (!isTypeOf(type, Collection.class)) {
                return null;
            }
            return getGenericParameter(type, 0);
        }
    
        /**
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 23.6K bytes
    - Viewed (0)
Back to top