Class JavaModuleValidateOperation
java.lang.Object
org.mule.extensions.java.internal.operation.JavaModuleValidateOperation
Defines the operations of
JavaModule which executes the Validators that the extension provides out of the box- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateType(String clazz, Object instance, boolean acceptSubtypes) Operation that allows the user to validate that a giveninstanceis aninstanceofthe specifiedclass.
-
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 giveninstanceis aninstanceofthe specifiedclass.- Parameters:
clazz- the fully qualified name of the expectedClassfor the instanceinstance- the object whose type is expected to be aninstanceofof the givenclassacceptSubtypes- whether or not to accept sub types of the givenclassor if the instance has to be of the exact sameclass- Throws:
ClassNotFoundModuleException- if the givenclassis not found in the current contextWrongTypeModuleException- if the validation fails because theinstanceis not of the expectedclasstype
-