Class JavaModuleValidateOperation

java.lang.Object
org.mule.extensions.java.internal.operation.JavaModuleValidateOperation

public class JavaModuleValidateOperation extends Object
Defines the operations of JavaModule which executes the Validators that the extension provides out of the box
Since:
1.0
  • Constructor Details

    • JavaModuleValidateOperation

      public JavaModuleValidateOperation()
  • Method Details

    • validateType

      @Validator @Throws(JavaValidateTypeErrorProvider.class) public void validateType(@ClassValue @Alias("class") @Optional @Expression(NOT_SUPPORTED) String clazz, Object instance, @Optional(defaultValue="true") boolean acceptSubtypes) throws ClassNotFoundModuleException, WrongTypeModuleException
      Operation that allows the user to validate that a given instance is an instanceof the specified class.
      Parameters:
      clazz - the fully qualified name of the expected Class for the instance
      instance - the object whose type is expected to be an instanceof of the given class
      acceptSubtypes - whether or not to accept sub types of the given class or if the instance has to be of the exact same class
      Throws:
      ClassNotFoundModuleException - if the given class is not found in the current context
      WrongTypeModuleException - if the validation fails because the instance is not of the expected class type