Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for invokeStatic (0.18 sec)

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

        @Test(expected = MethodNotStaticRuntimeException.class)
        public void testFoo_InvokeStatic() throws Exception {
            final BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
            final MethodDesc foo = beanDesc.getMethodDesc("foo");
            assertThat(foo.getParameterTypes().length, is(0));
            assertThat(foo.isStatic(), is(not(true)));
            foo.invokeStatic();
        }
    
        /**
         * @throws Exception
         */
        @Test
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/beans/impl/MethodDescImpl.java

            return MethodUtil.invoke(method, target, args);
        }
    
        @Override
        public <T> T invokeStatic(final Object... args) {
            if (!isStatic()) {
                throw new MethodNotStaticRuntimeException(getBeanDesc().getBeanClass(), methodName);
            }
            return MethodUtil.invokeStatic(method, args);
        }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/beans/MethodDesc.java

        /**
         * staticなメソッドを呼び出してその戻り値を返します。
         *
         * @param <T>
         *            メソッドの戻り値の型
         * @param args
         *            メソッドの引数
         * @return メソッドの戻り値
         */
        <T> T invokeStatic(Object... args);
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/lang/MethodUtil.java

         * @throws InvocationTargetRuntimeException
         *             基本となるメソッドが例外をスローする場合
         * @see Method#invoke(Object, Object[])
         */
        @SuppressWarnings("unchecked")
        public static <T> T invokeStatic(final Method method, final Object... args)
                throws InvocationTargetRuntimeException, IllegalAccessRuntimeException {
            assertArgumentNotNull("method", method);
    
            return (T) invoke(method, null, args);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 13.8K bytes
    - Viewed (0)
Back to top