private String handleTokenReplacement ( String str , EntityContext context ) throws Siren4JException { String result = "" ; // First resolve parents result = ReflectionUtils . replaceFieldTokens ( context . getParentObject ( ) , str , context . getParentFieldInfo ( ) , true ) ; // Now resolve others result = ReflectionUtils . flattenReservedTokens ( ReflectionUtils . replaceFieldTokens ( context . getCurrentObject ( ) , result , context . getCurrentFieldInfo ( ) , false ) ) ; return result ; }
Helper method to do token replacement for strings .