public class TransformerUtils extends Object
Modifier and Type | Class and Description |
---|---|
protected static interface |
TransformerUtils.TransformerSource |
Constructor and Description |
---|
TransformerUtils() |
public static final String COMMA
public static void initialiseAllTransformers(List<Transformer> transformers) throws InitialisationException
InitialisationException
public static String toString(List<Transformer> transformers)
public static Transformer firstOrNull(List<Transformer> transformers)
public static boolean isSourceTypeSupportedByFirst(List<Transformer> transformers, Class clazz)
protected static List<Transformer> getTransformersFromSource(TransformerUtils.TransformerSource source)
public static List<Transformer> getDefaultInboundTransformers(TransportServiceDescriptor serviceDescriptor, ImmutableEndpoint endpoint)
public static List<Transformer> getDefaultResponseTransformers(TransportServiceDescriptor serviceDescriptor, ImmutableEndpoint endpoint)
public static List<Transformer> getDefaultOutboundTransformers(TransportServiceDescriptor serviceDescriptor, ImmutableEndpoint endpoint)
public static List<Transformer> getTransformers(String names, MuleContext muleContext) throws DefaultMuleException
names
- - a list of transformers separated by commandsmuleContext
- the current muleContext. This is used to look up transformers in the registryDefaultMuleException
- if any of the transformers cannot be foundpublic static void checkTransformerReturnClass(Transformer transformer, Object value) throws TransformerException
transformer
- the transformer used to validatevalue
- the output valueTransformerException
- if the out[ut value is of a unexpected type.public static <T> Object transformToAny(T input, MuleContext muleContext, DataType<?>... supportedTypes)
public static String generateTransformerName(Class<? extends Transformer> transformerClass, DataType returnType)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.