public class TransformerUtils extends Object
| Constructor and Description |
|---|
TransformerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkTransformerReturnClass(Transformer transformer,
Object value)
Checks whether a given value is a valid output for a transformer.
|
static Transformer |
firstOrNull(List<Transformer> transformers) |
static String |
generateTransformerName(Class<? extends Transformer> transformerClass,
org.mule.runtime.api.metadata.DataType returnType) |
static List<Transformer> |
getTransformers(String names,
MuleContext muleContext)
Builds a list of Transformers.
|
static void |
initialiseAllTransformers(List<Transformer> transformers)
Deprecated.
Transport infrastructure is deprecated.
|
static String |
toString(List<Transformer> transformers) |
static <T> Object |
transformToAny(T input,
MuleContext muleContext,
org.mule.runtime.api.metadata.DataType... supportedTypes) |
public static final String COMMA
@Deprecated public static void initialiseAllTransformers(List<Transformer> transformers) throws org.mule.runtime.api.lifecycle.InitialisationException
org.mule.runtime.api.lifecycle.InitialisationExceptionpublic static String toString(List<Transformer> transformers)
public static Transformer firstOrNull(List<Transformer> transformers)
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, org.mule.runtime.api.metadata.DataType... supportedTypes)
public static String generateTransformerName(Class<? extends Transformer> transformerClass, org.mule.runtime.api.metadata.DataType returnType)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.