Examples of supports()


Examples of org.springframework.oxm.GenericMarshaller.supports()

        if (marshaller == null) {
            return false;
        }
        else if (marshaller instanceof GenericMarshaller) {
            GenericMarshaller genericMarshaller = (GenericMarshaller) marshaller;
            return genericMarshaller.supports(returnType.getGenericParameterType());
        }
        else {
            return marshaller.supports(returnType.getParameterType());
        }
    }

Examples of org.springframework.oxm.GenericUnmarshaller.supports()

        if (method.getParameterTypes().length != 1) {
            return false;
        }
        else if (getUnmarshaller() instanceof GenericUnmarshaller) {
            GenericUnmarshaller genericUnmarshaller = (GenericUnmarshaller) getUnmarshaller();
            return genericUnmarshaller.supports(method.getGenericParameterTypes()[0]);
        }
        else {
            return getUnmarshaller().supports(method.getParameterTypes()[0]);
        }
    }

Examples of org.springframework.oxm.Marshaller.supports()

        else if (marshaller instanceof GenericMarshaller) {
            GenericMarshaller genericMarshaller = (GenericMarshaller) marshaller;
            return genericMarshaller.supports(returnType.getGenericParameterType());
        }
        else {
            return marshaller.supports(returnType.getParameterType());
        }
    }

    @Override
    public void handleReturnValue(MessageContext messageContext, MethodParameter returnType, Object returnValue)

Examples of org.springframework.oxm.Unmarshaller.supports()

        }
        else if (unmarshaller instanceof GenericUnmarshaller) {
            return ((GenericUnmarshaller) unmarshaller).supports(parameter.getGenericParameterType());
        }
        else {
            return unmarshaller.supports(parameter.getParameterType());
        }
    }

    @Override
    public Object resolveArgument(MessageContext messageContext, MethodParameter parameter) throws Exception {

Examples of org.springframework.security.access.AccessDecisionVoter.supports()

        Iterator<AccessDecisionVoter> iter = this.decisionVoters.iterator();

        while (iter.hasNext()) {
            AccessDecisionVoter voter = iter.next();

            if (voter.supports(attribute)) {
                return true;
            }
        }

        return false;

Examples of org.springframework.security.access.intercept.AfterInvocationManager.supports()

    }

    @Test(expected=IllegalArgumentException.class)
    public void intitalizationRejectsAfterInvocationManagerThatDoesNotSupportMethodInvocation() throws Exception {
        final AfterInvocationManager aim = mock(AfterInvocationManager.class);
        when(aim.supports(MethodInvocation.class)).thenReturn(false);
        interceptor.setAfterInvocationManager(aim);
        interceptor.afterPropertiesSet();
    }

    @Test(expected=IllegalArgumentException.class)

Examples of org.springframework.security.access.intercept.AfterInvocationProviderManager.supports()

        list.add(new MockAfterInvocationProvider("swap2", MethodInvocation.class, new SecurityConfig("GIVE_ME_SWAP2")));
        list.add(new MockAfterInvocationProvider("swap3", MethodInvocation.class, new SecurityConfig("GIVE_ME_SWAP3")));
        manager.setProviders(list);
        manager.afterPropertiesSet();

        assertFalse(manager.supports(new SecurityConfig("UNKNOWN_ATTRIB")));
        assertTrue(manager.supports(new SecurityConfig("GIVE_ME_SWAP2")));
    }

    public void testSupportsSecureObjectIteration() throws Exception {
        AfterInvocationProviderManager manager = new AfterInvocationProviderManager();

Examples of org.springframework.security.access.intercept.NullRunAsManager.supports()

        assertNull(runAs.buildRunAs(null, null, null));
    }

    public void testAlwaysSupportsClass() {
        NullRunAsManager runAs = new NullRunAsManager();
        assertTrue(runAs.supports(String.class));
    }

    public void testNeverSupportsAttribute() {
        NullRunAsManager runAs = new NullRunAsManager();
        assertFalse(runAs.supports(new SecurityConfig("X")));

Examples of org.springframework.security.access.intercept.RunAsManager.supports()

    }

    @Test(expected=IllegalArgumentException.class)
    public void intitalizationRejectsRunAsManagerThatDoesNotSupportMethodInvocation() throws Exception {
        final RunAsManager ram = mock(RunAsManager.class);
        when(ram.supports(MethodInvocation.class)).thenReturn(false);
        interceptor.setRunAsManager(ram);
        interceptor.afterPropertiesSet();
    }

    @Test(expected=IllegalArgumentException.class)

Examples of org.springframework.security.access.vote.AuthenticatedVoter.supports()

        }
    }

    public void testSupports() {
        AuthenticatedVoter voter = new AuthenticatedVoter();
        assertTrue(voter.supports(String.class));
        assertTrue(voter.supports(new SecurityConfig(AuthenticatedVoter.IS_AUTHENTICATED_ANONYMOUSLY)));
        assertTrue(voter.supports(new SecurityConfig(AuthenticatedVoter.IS_AUTHENTICATED_FULLY)));
        assertTrue(voter.supports(new SecurityConfig(AuthenticatedVoter.IS_AUTHENTICATED_REMEMBERED)));
        assertFalse(voter.supports(new SecurityConfig("FOO")));
    }
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.