- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for getActualElementClassOfSet (0.66 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 element type of the set, or null if not a parameterized set */ public static Class<?> getActualElementClassOfSet(final Type type, final Map<TypeVariable<?>, Type> map) { if (!isTypeOf(type, Set.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("set"); assertThat(GenericsUtil.getActualElementClassOfSet(method.getGenericReturnType(), map), is(sameClass(String.class))); } /** * @throws Exception */ public void testGetActualKeyClassOfMap() 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)