src/main/java/js/container/ManagedClass.java
private static <T extends Annotation> T getAnnotation(Class<?> clazz, Class<T> annotationClass) {
		T annotation = clazz.getAnnotation(annotationClass);
		if (annotation == null) {
			for (Class<?> interfaceClass : clazz.getInterfaces()) {
				annotation = interfaceClass.getAnnotation(annotationClass);
				if (annotation != null) {
					break;
				}
			}
		}
		return annotation;
	}
private static <T extends Annotation> T getAnnotation(Class<?> clazz, Class<T> annotationClass) {
		T annotation = clazz.getAnnotation(annotationClass);
		if (annotation == null) {
			for (Class<?> interfaceClass : clazz.getInterfaces()) {
				annotation = interfaceClass.getAnnotation(annotationClass);
				if (annotation != null) {
					break;
				}
			}
		}
		return annotation;
	}
private static < T extends Annotation > T getAnnotation ( Class < ? > clazz , Class < T > annotationClass ) { T annotation = clazz . getAnnotation ( annotationClass ) ; if ( annotation == null ) { for ( Class < ? > interfaceClass : clazz . getInterfaces ( ) ) { annotation = interfaceClass . getAnnotation ( annotationClass ) ; if ( annotation != null ) { break ; } } } return annotation ; }
Get class annotation or null if none found. This getter uses extended annotation searching scope: it searches first on
given class then tries with all class interfaces. Note that only interfaces are used as alternative for annotation
search. Super class is not included.
<p>
Returns null if no annotation found on base class or interfaces.

@param clazz base class to search for annotation,
@param annotationClass annotation to search for.
@param <T> annotation type.
@return annotation instance or null if none found.
Get class annotation or null if none found . This getter uses extended annotation searching scope : it searches first on given class then tries with all class interfaces . Note that only interfaces are used as alternative for annotation search . Super class is not included . <p > Returns null if no annotation found on base class or interfaces .