public static Annotation getAnnotation ( Annotation [ ] annotations , Class < ? > annotationClass ) { return Arrays . stream ( annotations ) . filter ( annotation -> annotation . annotationType ( ) . equals ( annotationClass ) ) . findFirst ( ) . orElse ( null ) ; }
Gets annotation .