Contact Free trial Login

Java Module Examples - Mule 4

To fully benefit from using Java module, see the following examples of configuring the module operations:

  • Create an Instance of a Class
    Configure the New operation to create an instance of a Java class.

  • Invoke Java Methods
    Configure the Invoke and Invoke static operations to call Java methods.

  • Transform Arguments
    Configure Java module to transform the arguments given to a Java invocation even if they don’t exactly match the type expected by the Java method.

  • Test for an Instance of a Class
    Configure the Validate type operation to operation that tests whether an object is an instance of a class.

  • Work with Throwables
    Configure Java module to use DataWeave functions for throwable instances.