Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for getElementClassOfCollection (0.29 sec)

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

            BeanDesc bd = BeanDescFactory.getBeanDesc(Hoge.class);
            PropertyDesc pd = bd.getPropertyDesc("foo");
            assertThat(pd.isParameterized(), is(true));
            assertThat(pd.getElementClassOfCollection(), is(sameClass(String.class)));
    
            ParameterizedClassDesc pcd = pd.getParameterizedClassDesc();
            assertThat(pcd.getRawClass(), is(sameClass(List.class)));
    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/beans/impl/MethodDescImpl.java

        }
    
        @Override
        public ParameterizedClassDesc getParameterizedClassDesc() {
            return parameterizedClassDesc;
        }
    
        @Override
        public Class<?> getElementClassOfCollection(final int index) {
            assertArgumentArrayIndex("index", index, parameterTypes.length);
    
            if (!Collection.class.isAssignableFrom(parameterTypes[index]) || !isParameterized(index)) {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/beans/impl/ConstructorDescImpl.java

        }
    
        @Override
        public ParameterizedClassDesc[] getParameterizedClassDescs() {
            return parameterizedClassDescs;
        }
    
        @Override
        public Class<?> getElementClassOfCollection(final int index) {
            assertArgumentArrayIndex("index", index, parameterTypes.length);
    
            if (!Collection.class.isAssignableFrom(parameterTypes[index]) || !isParameterized(index)) {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/beans/MethodDesc.java

         *
         * @param index
         *            引数のインデックス
         * @return メソッドの引数型がパラメタ化された{@link Collection}の場合はその要素型、そうでない場合は
         *         {@literal null}
         */
        Class<?> getElementClassOfCollection(int index);
    
        /**
         * メソッドの引数型がパラメタ化された{@link Map}の場合、そのキー型を返します。
         *
         * @param index
         *            引数のインデックス
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/beans/impl/FieldDescImplTest.java

        @Test
        public void testList() throws Exception {
            final BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
            final FieldDesc hoge = beanDesc.getFieldDesc("list");
            assertThat(hoge.getElementClassOfCollection(), is(sameClass(String.class)));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testMap() throws Exception {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/beans/impl/PropertyDescImpl.java

        }
    
        @Override
        public ParameterizedClassDesc getParameterizedClassDesc() {
            return parameterizedClassDesc;
        }
    
        @Override
        public Class<?> getElementClassOfCollection() {
            if (!Collection.class.isAssignableFrom(propertyType) || !isParameterized()) {
                return null;
            }
            final ParameterizedClassDesc pcd = parameterizedClassDesc.getArguments()[0];
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 15.3K bytes
    - Viewed (0)
Back to top