- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for getValueTypeOfMap (1.19 sec)
-
src/main/java/org/codelibs/core/lang/MethodUtil.java
assertArgumentNotNull("method", method); final Type[] parameterTypes = method.getGenericParameterTypes(); return GenericsUtil.getRawClass(GenericsUtil.getValueTypeOfMap(parameterTypes[position])); } /** * Returns the value type of the parameterized map 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 value type of the map */ public static Class<?> getValueTypeOfMap(final Field field) { assertArgumentNotNull("field", field); final Type type = field.getGenericType(); return GenericsUtil.getRawClass(GenericsUtil.getValueTypeOfMap(type)); }
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/test/java/org/codelibs/core/lang/FieldUtilTest.java
final Field f = ClassUtil.getField(Baz.class, "map"); assertThat(FieldUtil.getKeyTypeOfMap(f), is(sameClass(String.class))); assertThat(FieldUtil.getValueTypeOfMap(f), is(sameClass(Integer.class))); } /** * */ public static class Baz { /** */ @SuppressWarnings("rawtypes")
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/GenericsUtil.java
* </p> * * @param type * the type to analyze * @return the value type of the map, or null if not a parameterized map */ public static Type getValueTypeOfMap(final Type type) { if (!isTypeOf(type, Map.class)) { return null; } return getGenericParameter(type, 1); } /**
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 23.4K bytes - Viewed (0)