Package org.springframework.oxm

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)
View Full Code Here


  @Test
  public void canWrite() throws Exception {
    Marshaller marshaller = mock(Marshaller.class);

    given(marshaller.supports(Integer.class)).willReturn(false);
    given(marshaller.supports(String.class)).willReturn(true);

    MarshallingHttpMessageConverter converter = new MarshallingHttpMessageConverter();
    converter.setMarshaller(marshaller);
View Full Code Here

  @Test
  public void canWrite() throws Exception {
    Marshaller marshaller = mock(Marshaller.class);

    given(marshaller.supports(Integer.class)).willReturn(false);
    given(marshaller.supports(String.class)).willReturn(true);

    MarshallingHttpMessageConverter converter = new MarshallingHttpMessageConverter();
    converter.setMarshaller(marshaller);

    assertFalse(converter.canWrite(Boolean.class, MediaType.TEXT_PLAIN));
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.