public void setDefaults ( Annotation [ ] defaultAnnotations ) { if ( defaultAnnotations == null ) { return ; } for ( Annotation each : defaultAnnotations ) { Class < ? extends Annotation > key = each . annotationType ( ) ; if ( Title . class . equals ( key ) || Description . class . equals ( key ) ) { continue ; } if ( ! annotations . containsKey ( key ) ) { annotations . put ( key , each ) ; } } }
Set default values for annotations . Initial annotation take precedence over the default annotation when both annotation types are present