private void applyCompilerDefaultValueOverrides ( Map < String , TweakInfo > tweakInfos ) { for ( Entry < String , Node > entry : compilerDefaultValueOverrides . entrySet ( ) ) { String tweakId = entry . getKey ( ) ; TweakInfo tweakInfo = tweakInfos . get ( tweakId ) ; if ( tweakInfo == null ) { compiler . report ( JSError . make ( UNKNOWN_TWEAK_WARNING , tweakId ) ) ; } else { TweakFunction registerFunc = tweakInfo . registerCall . tweakFunc ; Node value = entry . getValue ( ) ; if ( ! registerFunc . isValidNodeType ( value . getToken ( ) ) ) { compiler . report ( JSError . make ( INVALID_TWEAK_DEFAULT_VALUE_WARNING , tweakId , registerFunc . getName ( ) , registerFunc . getExpectedTypeName ( ) ) ) ; } else { tweakInfo . defaultValueNode = value ; } } } }
Sets the default values of tweaks based on compiler options .