public List < Annotation > getAllAnnotations ( ) { List < Annotation > ret = new ArrayList < Annotation > ( ) ; // Annotations within the annotation group if ( annotationGroup != null ) ret . addAll ( annotationGroup . getAnnotations ( ) ) ; // Annotations within the statements if ( statements != null ) { for ( final Statement stmt : statements ) { AnnotationGroup ag = stmt . getAnnotationGroup ( ) ; if ( ag != null && hasItems ( ag . getAnnotations ( ) ) ) { ret . addAll ( ag . getAnnotations ( ) ) ; } } } // Annotations within nested statement groups if ( statementGroups != null ) { for ( final StatementGroup sg : statementGroups ) ret . addAll ( sg . getAllAnnotations ( ) ) ; } return ret ; }
Returns a list of all annotations contained by this statement group its statements and nested statement groups .