// Path: src/main/java/net/andreinc/jbvext/annotations/misc/validators/InstanceOfValidator.java
// public class InstanceOfValidator implements ConstraintValidator<InstanceOf, Object> {
// 
//     private InstanceOf annotation;
// 
//     @Override
//     public void initialize(InstanceOf constraintAnnotation) {
//         this.annotation = constraintAnnotation;
//     }
// 
//     @Override
//     public boolean isValid(Object value, ConstraintValidatorContext context) {
// 
//         if (null == value) {
//             return false;
//         }
// 
//         Class<?>[] classes = annotation.value();
// 
//         for(Class<?> cls : classes) {
//             if (cls.isInstance(value)) {
//                 return true;
//             }
//         }
// 
//         return false;
//     }
// }


import net.andreinc.jbvext.annotations.misc.validators.InstanceOfValidator;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
package net.andreinc.jbvext.annotations.misc;




@Documented
@Constraint(validatedBy = InstanceOfValidator.class)
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
// Path: src/main/java/net/andreinc/jbvext/annotations/misc/validators/InstanceOfValidator.java
// public class InstanceOfValidator implements ConstraintValidator<InstanceOf, Object> {
// 
//     private InstanceOf annotation;
// 
//     @Override
//     public void initialize(InstanceOf constraintAnnotation) {
//         this.annotation = constraintAnnotation;
//     }
// 
//     @Override
//     public boolean isValid(Object value, ConstraintValidatorContext context) {
// 
//         if (null == value) {
//             return false;
//         }
// 
//         Class<?>[] classes = annotation.value();
// 
//         for(Class<?> cls : classes) {
//             if (cls.isInstance(value)) {
//                 return true;
//             }
//         }
// 
//         return false;
//     }
// }


// Path: src/main/java/net/andreinc/jbvext/annotations/misc/InstanceOf.java
import net.andreinc.jbvext.annotations.misc.validators.InstanceOfValidator;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

package net.andreinc.jbvext.annotations.misc;




@Documented
@Constraint(validatedBy = InstanceOfValidator.class)
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
public @interface InstanceOf {