public class JavaModuleValidateOperation extends Object
JavaModule which executes the Validators that the extension provides out of
the box| Constructor and Description |
|---|
JavaModuleValidateOperation() |
| Modifier and Type | Method and Description |
|---|---|
void |
validateType(String clazz,
Object instance,
boolean acceptSubtypes)
Operation that allows the user to validate that a given
instance is an instanceof the specified class. |
@Validator @Throws(value=JavaValidateTypeErrorProvider.class) public void validateType(@ClassValue @Alias(value="class") @Optional @Expression(value=NOT_SUPPORTED) String clazz, Object instance, @Optional(defaultValue="true") boolean acceptSubtypes) throws ClassNotFoundModuleException, WrongTypeModuleException
instance is an instanceof the specified class.clazz - the fully qualified name of the expected Class for the instanceinstance - the object whose type is expected to be an instanceof of the given classacceptSubtypes - whether or not to accept sub types of the given class or if the instance has to be
of the exact same classClassNotFoundModuleException - if the given class is not found in the current contextWrongTypeModuleException - if the validation fails because the instance is not of the expected class typeCopyright © 2025 MuleSoft, Inc.. All rights reserved.