protected void validate ( ST st , Set < String > expectedArguments ) { Map < ? , ? > formalArgs = st . impl . formalArguments ; if ( formalArgs == null ) { for ( String s : expectedArguments ) { this . errors . addError ( "ST <{}> does not define argument <{}>" , st . getName ( ) , s ) ; } } else { for ( String s : expectedArguments ) { if ( ! formalArgs . containsKey ( s ) ) { this . errors . addError ( "ST <{}> does not define argument <{}>" , st . getName ( ) , s ) ; } } } }
Validates the ST object and marks all missing arguments .