Examples of MethodLookupAction


Examples of org.jboss.weld.security.MethodLookupAction

     * @throws NoSuchMethodException
     */
    static Method lookupMethod(Class<?> javaClass, String methodName, Class<?>[] parameterTypes) throws NoSuchMethodException {
        if (System.getSecurityManager() != null) {
            try {
                return AccessController.doPrivileged(new MethodLookupAction(javaClass, methodName, parameterTypes));
            } catch (PrivilegedActionException e) {
                if (e.getCause() instanceof NoSuchMethodException) {
                    throw (NoSuchMethodException) e.getCause();
                }
                throw new WeldException(e.getCause());
View Full Code Here

Examples of org.jboss.weld.security.MethodLookupAction

        Assert.assertEquals("foo", m.invoke(to, ""));
    }

    @Test
    public void testLookupMethod() throws PrivilegedActionException, NoSuchMethodException {
        Assert.assertNotNull(AccessController.doPrivileged(new MethodLookupAction(TestObject.class, "rootOfAllEvil", new Class<?>[]{})));
        Assert.assertNotNull(MethodLookupAction.lookupMethod(TestObject.class, "rootOfAllEvil", new Class<?>[]{}));
    }
View Full Code Here

Examples of org.jboss.weld.security.MethodLookupAction

    }

    @Test
    public void testLookupMethodNotFound() throws Throwable {
        try {
            AccessController.doPrivileged(new MethodLookupAction(TestObject.class, "eioota", new Class<?>[] {}));
            fail();
        } catch (PrivilegedActionException e) {
            if(!(e.getCause() instanceof NoSuchMethodException)) {
                fail();
            };
View Full Code Here

Examples of org.jboss.weld.security.MethodLookupAction

     * @throws NoSuchMethodException
     */
    static Method lookupMethod(Class<?> javaClass, String methodName, Class<?>[] parameterTypes) throws NoSuchMethodException {
        if (System.getSecurityManager() != null) {
            try {
                return AccessController.doPrivileged(new MethodLookupAction(javaClass, methodName, parameterTypes));
            } catch (PrivilegedActionException e) {
                if (e.getCause() instanceof NoSuchMethodException) {
                    throw (NoSuchMethodException) e.getCause();
                }
                throw new WeldException(e.getCause());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.