private String replaceInternalFromUri ( String input , final List < Triple < Token , Token , String > > replace , UriBaseListener rewriterListener ) { Pair < ParserRuleContext , CommonTokenStream > parser = prepareUri ( input ) ; pathSegmentIndex = - 1 ; walker . walk ( rewriterListener , parser . value0 ) ; TokenStreamRewriter rewriter = new TokenStreamRewriter ( parser . value1 ) ; for ( Triple < Token , Token , String > item : replace ) { rewriter . replace ( item . value0 , item . value1 , item . value2 ) ; } return rewriter . getText ( ) ; }
Replace internal from uri .