- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for getActualKeyClassOfMap (0.33 seconds)
-
src/main/java/org/codelibs/core/lang/GenericsUtil.java
* @param map * the map that contains the type variables and type arguments * @return the actual key type of the map, or null if not a parameterized map */ public static Class<?> getActualKeyClassOfMap(final Type type, final Map<TypeVariable<?>, Type> map) { if (!isTypeOf(type, Map.class)) { return null; } return getActualClass(getGenericParameter(type, 0), map); }Created: Fri Apr 03 20:58:12 GMT 2026 - Last Modified: Thu Jul 31 08:16:49 GMT 2025 - 23.4K bytes - Click Count (0) -
src/test/java/org/codelibs/core/lang/GenericsUtilTest.java
final Map<TypeVariable<?>, Type> map = GenericsUtil.getTypeVariableMap(Hoge.class); final Method method = Hoge.class.getMethod("map"); assertThat(GenericsUtil.getActualKeyClassOfMap(method.getGenericReturnType(), map), is(sameClass(String.class))); } /** * @throws Exception */ public void testGetActualValueClassOfMap() throws Exception {
Created: Fri Apr 03 20:58:12 GMT 2026 - Last Modified: Sat May 10 01:32:17 GMT 2025 - 11.5K bytes - Click Count (0)