Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for getRawClass (0.14 sec)

  1. src/test/java/org/codelibs/core/beans/impl/BeanDescImplTest.java

            ParameterizedClassDesc pcd = pd.getParameterizedClassDesc();
            assertThat(pcd.getRawClass(), is(sameClass(Map.class)));
            assertThat(pcd.getArguments().length, is(2));
            assertThat(pcd.getArguments()[0].getRawClass(), is(sameClass(String.class)));
            assertThat(pcd.getArguments()[1].getRawClass(), is(sameClass(Date.class)));
    
            pd = bd.getPropertyDesc("hege");
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/lang/MethodUtil.java

            assertArgumentNotNull("method", method);
    
            final Type[] parameterTypes = method.getGenericParameterTypes();
            return GenericsUtil.getRawClass(GenericsUtil.getElementTypeOfCollection(parameterTypes[position]));
        }
    
        /**
         * 指定されたメソッドの戻り値型として宣言されているパラメタ化されたコレクションの要素型を返します。
         *
         * @param method
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/beans/impl/PropertyDescImpl.java

                return null;
            }
            final ParameterizedClassDesc pcd = parameterizedClassDesc.getArguments()[0];
            if (pcd == null) {
                return null;
            }
            return pcd.getRawClass();
        }
    
        @Override
        public Class<?> getKeyClassOfMap() {
            if (!Map.class.isAssignableFrom(propertyType) || !isParameterized()) {
                return null;
            }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/lang/FieldUtil.java

         */
        public static Class<?> getElementTypeOfCollection(final Field field) {
            assertArgumentNotNull("field", field);
    
            final Type type = field.getGenericType();
            return GenericsUtil.getRawClass(GenericsUtil.getElementTypeOfCollection(type));
        }
    
        /**
         * パラメタ化されたマップ型のフィールドのキー型を返します。
         *
         * @param field
         *            パラメタ化されたマップ型のフィールド。{@literal null}であってはいけません
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/lang/GenericsUtil.java

         * @return <code>type</code>の原型
         */
        public static Class<?> getRawClass(final Type type) {
            if (type instanceof Class) {
                return Class.class.cast(type);
            }
            if (type instanceof ParameterizedType) {
                final ParameterizedType parameterizedType = ParameterizedType.class.cast(type);
                return getRawClass(parameterizedType.getRawType());
            }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/core/lang/GenericsUtilTest.java

            final Method m1 = ArrayType.class.getMethod("arrayOfStringClass");
            final Type t1 = m1.getGenericReturnType();
            final Type t2 = GenericsUtil.getElementTypeOfArray(t1);
            assertThat(GenericsUtil.getRawClass(t2), is(sameClass(Class.class)));
            assertThat(GenericsUtil.getGenericParameter(t2, 0), is(sameClass(String.class)));
        }
    
        /**
         * @throws Exception
         */
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top