public static Stream<Annotation> getAnnotations(final Method method) {
		return getClasses(method.getDeclaringClass())
			.flatMap(cls ->
				Stream.concat(
					Stream.of(cls),
					Stream.of(cls.getInterfaces())
				)
			)
			.flatMap(cls -> Stream.of(cls.getMethods()))
			.filter(m -> equals(m, method))
			.flatMap(m -> Stream.of(m.getAnnotations()));
	}
Return all annotations of the given method, inclusively the inherited one.

@param method the method for which to fetch the annotations
@return all annotations of the given method
jenetics.incubator/src/main/java/io/jenetics/incubator/beans/internal/Reflect.java