@Target(value=METHOD) @Retention(value=RUNTIME) @Documented public @interface OutputResolver
OutputTypeResolver that will be used
to resolve the Component's return type dynamically| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends org.mule.runtime.api.metadata.resolving.AttributesTypeResolver> |
attributes
Specifies the
AttributesTypeResolver which should be used to resolve the type of
the Attributes of the output message. |
Class<? extends org.mule.runtime.api.metadata.resolving.OutputTypeResolver> |
output
Specifies the
OutputTypeResolver which should be used to resolve the type of the
value which will go into the payload of the output message. |
public abstract Class<? extends org.mule.runtime.api.metadata.resolving.OutputTypeResolver> output
OutputTypeResolver which should be used to resolve the type of the
value which will go into the payload of the output message.
Always keep in mind that this should resolve to a single unitary type. That means that
for operations which return collections, this should not return an ArrayType but
the type of the items inside the collection.
So, if the operation returns List<Apple>, this should return a MetadataType
for the Apple. Also, if the operation returns List<Result<Apple, AppleAttributes>>,
it still should only return the Apple's metadata.
OutputTypeResolver for the annotated Componentpublic abstract Class<? extends org.mule.runtime.api.metadata.resolving.AttributesTypeResolver> attributes
AttributesTypeResolver which should be used to resolve the type of
the Attributes of the output message.
Always consider that this resolver should be consistent with the one returned by
output().
So, if the operation returns List<Apple>, this should return a MetadataType
for attributes which describe the Apple, not the list. . Also, if the operation returns
List<Result<Apple, AppleAttributes>>, it still should only describe AppleAttributes.
AttributesTypeResolver for the annotated ComponentCopyright © 2017 MuleSoft, Inc.. All rights reserved.