- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for getValueTypeOfMap (0.19 sec)
-
src/test/java/org/codelibs/core/lang/GenericsUtilTest.java
assertThat(GenericsUtil.isTypeOf(t1, Map.class), is(true)); assertThat(GenericsUtil.getKeyTypeOfMap(t1), is(sameClass(String.class))); assertThat(GenericsUtil.getValueTypeOfMap(t1), is(sameClass(Object.class))); final Method m2 = MapType.class.getMethod("mapOfClassToString"); final Type t2 = m2.getGenericReturnType();
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 11.5K 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 Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 4.1K bytes - Viewed (0) -
src/main/java/org/codelibs/core/lang/FieldUtil.java
* パラメタ化されたマップ型のフィールド。{@literal null}であってはいけません * @return マップの値型 */ public static Class<?> getValueTypeOfMap(final Field field) { assertArgumentNotNull("field", field); final Type type = field.getGenericType(); return GenericsUtil.getRawClass(GenericsUtil.getValueTypeOfMap(type)); }
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 11.3K bytes - Viewed (0) -
src/main/java/org/codelibs/core/lang/MethodUtil.java
assertArgumentNotNull("method", method); final Type[] parameterTypes = method.getGenericParameterTypes(); return GenericsUtil.getRawClass(GenericsUtil.getValueTypeOfMap(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) -
src/main/java/org/codelibs/core/lang/GenericsUtil.java
* </p> * * @param type * パラメータ化された{@link Map} * @return パラメータ化された{@link Map}の値の型 */ public static Type getValueTypeOfMap(final Type type) { if (!isTypeOf(type, Map.class)) { return null; } return getGenericParameter(type, 1); } /**
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 23.6K bytes - Viewed (0)