protected void validate ( STGroup stg , Map < String , Set < String > > expectedChunks ) { for ( String s : expectedChunks . keySet ( ) ) { //null and "" are no valid templates, so we ignore them if ( s != null && ! "" . equals ( s ) ) { if ( stg . isDefined ( s ) ) { STValidator stv = new STValidator ( stg . getInstanceOf ( s ) , expectedChunks . get ( s ) ) ; this . errors . addAllErrors ( stv . getValidationErrors ( ) ) ; } else { this . errors . addError ( "STGroup <{}> does not define mandatory template <{}>" , GET_STG_NAME ( stg ) , s ) ; } } } }
Does the actual validation of the STGroup .