- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for getElementTypeOfCollection (0.26 sec)
-
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 Sep 05 20:58:11 UTC 2025 - Last Modified: Fri Jun 20 13:40:57 UTC 2025 - 4.1K bytes - Viewed (0) -
src/main/java/org/codelibs/core/lang/MethodUtil.java
assertArgumentNotNull("method", method); final Type[] parameterTypes = method.getGenericParameterTypes(); return GenericsUtil.getRawClass(GenericsUtil.getElementTypeOfCollection(parameterTypes[position])); } /** * Returns the element type of the parameterized collection declared as the method's return type. * * @param method
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 12.6K bytes - Viewed (0) -
src/main/java/org/codelibs/core/lang/FieldUtil.java
* @return the element type of the collection */ public static Class<?> getElementTypeOfCollection(final Field field) { assertArgumentNotNull("field", field); final Type type = field.getGenericType(); return GenericsUtil.getRawClass(GenericsUtil.getElementTypeOfCollection(type)); } /** * Returns the key type of a parameterized map field. *
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 9.8K bytes - Viewed (0) -
src/main/java/org/codelibs/core/lang/GenericsUtil.java
* </p> * * @param type * the type to analyze * @return the element type of the collection, or null if not a parameterized collection */ public static Type getElementTypeOfCollection(final Type type) { if (!isTypeOf(type, Collection.class)) { return null; } return getGenericParameter(type, 0); } /**
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 23.4K bytes - Viewed (0)