Package org.jboss.weld.security

Examples of org.jboss.weld.security.GetDeclaredMethodsAction


    public static Object getNonPrivateFinalMethodOrType(Class<?> type) {
        if (isFinal(type)) {
            return type;
        }
        for (Class<?> clazz = type; clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) {
            for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(clazz))) {
                if (isFinal(method) && !isPrivate(method) && !isStatic(method)) {
                    return method;
                }
            }
        }
View Full Code Here


            // Add all methods from the class hierarchy
            Class<?> cls = getBeanType();
            while (cls != null) {
                Set<MethodSignature> declaredBridgeMethods = new HashSet<MethodSignature>();
                for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(cls))) {

                    final MethodSignatureImpl methodSignature = new MethodSignatureImpl(method);

                    if (!Modifier.isFinal(method.getModifiers()) && !method.isBridge() && enhancedMethodSignatures.contains(methodSignature)
                            && !finalMethods.contains(methodSignature) && !processedBridgeMethods.contains(methodSignature)) {
View Full Code Here

    private void decoratorMethods(Class<?> cls, Set<Method> all) {
        if (cls == null) {
            return;
        }
        all.addAll(Arrays.asList(AccessController.doPrivileged(new GetDeclaredMethodsAction(cls))));

        decoratorMethods(cls.getSuperclass(), all);

        // by now we should have all declared methods, let's only add the missing ones
        for (Class<?> ifc : cls.getInterfaces()) {
View Full Code Here

        Assert.assertEquals(10, AccessController.doPrivileged(new GetMethodsAction(TestObject.class)).length);
    }

    @Test
    public void testGetDeclaredMethods() {
        Assert.assertEquals(2, AccessController.doPrivileged(new GetDeclaredMethodsAction(TestObject.class)).length);
    }
View Full Code Here

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

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

            generateEqualsMethod(proxyClassType);

            generateHashCodeMethod(proxyClassType);

            while (cls != null) {
                for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(cls))) {
                    if (!Modifier.isStatic(method.getModifiers()) &&
                            !Modifier.isFinal(method.getModifiers()) &&
                            (method.getDeclaringClass() != Object.class || method.getName().equals("toString")) &&
                            isMethodAccepted(method)) {
                        try {
View Full Code Here

        @Override
        protected Set<AnnotatedMethod<? super X>> computeValue() {
            ImmutableSet.Builder<AnnotatedMethod<? super X>> methods = ImmutableSet.builder();
            Class<? super X> clazz = javaClass;
            while (clazz != Object.class && clazz != null) {
                for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(clazz))) {
                    methods.add(BackedAnnotatedMethod.of(method, BackedAnnotatedType.this, sharedObjectCache));
                }
                clazz = clazz.getSuperclass();
            }
            return methods.build();
View Full Code Here

        for (Annotation a : annotationList) {
            builder.append('@');
            builder.append(a.annotationType().getName());
            builder.append('(');
            Method[] declaredMethods = AccessController.doPrivileged(new GetDeclaredMethodsAction(a.annotationType()));
            List<Method> methods = new ArrayList<Method>(declaredMethods.length);
            for (Method m : declaredMethods) {
                methods.add(m);
            }
            Collections.sort(methods, MethodComparator.INSTANCE);
View Full Code Here

TOP

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

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.