public Map < String , Integer > getRequiredStatements ( ) { Map < String , Integer > required = new HashMap < String , Integer > ( ) ; for ( Token token : address ) { if ( ! token . hasKey ( ) ) { // a single token or token expression // These are currently skipped: See asResource() parsing logic continue ; } else { // a value expression. key and value of the expression might be resolved // TODO: keys are not supported: Do we actually need that? String value_ref = token . getValue ( ) ; if ( value_ref . startsWith ( "{" ) ) { value_ref = value_ref . substring ( 1 , value_ref . length ( ) - 1 ) ; if ( ! required . containsKey ( value_ref ) ) { required . put ( value_ref , 1 ) ; } else { Integer count = required . get ( value_ref ) ; ++ count ; required . put ( value_ref , count ) ; } } } } return required ; }
Parses the address declaration for tokens that need to be resolved against the statement context .