class RequiredDataAdvice implements MethodBeforeAdvice {

	protected static boolean isHandlerMarkedAsDisabled(Class<? extends RequiredDataHandler> handlerType, Field field) {
		
		// if the annotation isn't present, return false
		if (!field.isAnnotationPresent(DisableHandlers.class)) {
			return false;
		} else {
			// otherwise we need to see if the handler type is one of the types specified in the annotation
			for (Class<? extends RequiredDataHandler> h : field.getAnnotation(DisableHandlers.class).handlerTypes()) {
				if (h.isAssignableFrom(handlerType)) {
					return true;
				}
			}
		}
		
		return false;
	}

}