Package org.jboss.weld.security

Examples of org.jboss.weld.security.GetDeclaredConstructorsAction


        Assert.assertEquals(2, AccessController.doPrivileged(new GetConstructorsAction(TestObject.class)).length);
    }

    @Test
    public void testGetDeclaredConstructors() {
        Assert.assertEquals(3, AccessController.doPrivileged(new GetDeclaredConstructorsAction(TestObject.class)).length);
    }
View Full Code Here


        Assert.assertEquals(3, AccessController.doPrivileged(new GetDeclaredConstructorsAction(TestObject.class)).length);
    }

    @Test
    public void testConstructorAccess() {
        testAllAccessible(grantAccess(AccessController.doPrivileged(new GetDeclaredConstructorsAction(TestObject.class))));
    }
View Full Code Here

        try {
            if (getBeanType().isInterface()) {
                ConstructorUtils.addDefaultConstructor(proxyClassType, initialValueBytecode, isUsingUnsafeInstantiators());
            } else {
                boolean constructorFound = false;
                for (Constructor<?> constructor : AccessController.doPrivileged(new GetDeclaredConstructorsAction(getBeanType()))) {
                    if ((constructor.getModifiers() & Modifier.PRIVATE) == 0) {
                        constructorFound = true;
                        String[] exceptions = new String[constructor.getExceptionTypes().length];
                        for (int i = 0; i < exceptions.length; ++i) {
                            exceptions[i] = constructor.getExceptionTypes()[i].getName();
View Full Code Here

    }

    private class BackedAnnotatedConstructors extends EagerlyInitializedLazyValueHolder<Set<AnnotatedConstructor<X>>> {
        @Override
        protected Set<AnnotatedConstructor<X>> computeValue() {
            Constructor<?>[] declaredConstructors = AccessController.doPrivileged(new GetDeclaredConstructorsAction(javaClass));
            ImmutableSet.Builder<AnnotatedConstructor<X>> constructors = ImmutableSet.builder();
            for (Constructor<?> constructor : declaredConstructors) {
                Constructor<X> c = Reflections.cast(constructor);
                constructors.add(BackedAnnotatedConstructor.of(c, BackedAnnotatedType.this, sharedObjectCache));
            }
View Full Code Here

TOP

Related Classes of org.jboss.weld.security.GetDeclaredConstructorsAction

Copyright © 2018 www.massapicom. 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.