if (anns == null) continue;
    public static void errorOnViolation(Class implClass, Method mthd, Object[] args)     throws ValidationException    {        if ( implClass == null || mthd == null )        {             throw new ApiUsageException(                    "ApiConstraintChecker expects non null class and method " +                    "arguments.");        }                log.info("Checking: " + mthd);                /* get arrays of arguments with parameters */        if ( args == null )            args = new Object[]{};        Object[] allAnnotations = findAnnotations(implClass, mthd);        for (int j = 0; j < allAnnotations.length; j++)        {            Annotation[][] anns = (Annotation[][]) allAnnotations[j];                        for (int i = 0; i < args.length; i++)            {                Object arg = args[i];                Annotation[] annotations = anns[i];                    boolean validated = false;                    for (Annotation annotation : annotations)                {                    if (NotNull.class.equals(annotation.annotationType()))                    {                        if (null == arg)                        {                            String msg = "Argument " + i + " to " + mthd                                    + " may not be null.";                            log.warn(msg);                            throw new ApiUsageException(msg);                            }                    }                        else if (Validate.class.equals(annotation.annotationType()))                    {                        validated = true;                        Validate validator = (Validate) annotation;                        Class[] validClasses = validator.value();                        ValidSet validSet = new ValidSet( validClasses );                            String msg = "Argument " + i + " must be of a type in:"                                + validSet;                            if (null == arg) {                            // handled by NotNull                        }                                                else if (arg instanceof Collection)                        {                            Collection coll = (Collection) arg;                            for (Object object : coll)                            {                                if ( ! validSet.isValid( object.getClass() ))                                    throw new ApiUsageException(msg);                            }                            }                            else                        {                            if ( ! validSet.isValid( arg.getClass() ))                            {                                throw new ApiUsageException(msg);                            }                        }                    }                }                    /* warn if someone's forgotten to annotate a method */                if (arg instanceof Collection && !validated)                    throw new ValidationException(mthd                            + " is missing a required @" + Validate.class.getName()                            + " annotation. This should be added to one of the "                             + " implemented interfaces. Refusing to proceed...");                }        }    }