protected String _resolve ( String name , Features features , Set < String > dependentFeatures , boolean resolveAliases , boolean evaluateHasPluginConditionals , int recursionCount , StringBuffer sb ) { final String sourceMethod = "_resolve" ; //$NON-NLS-1$ boolean isTraceLogging = log . isLoggable ( Level . FINER ) ; if ( isTraceLogging ) { log . entering ( ConfigImpl . class . getName ( ) , sourceMethod , new Object [ ] { name , features , dependentFeatures , resolveAliases , evaluateHasPluginConditionals , recursionCount , sb } ) ; } String result = name ; if ( name != null && name . length ( ) != 0 ) { if ( recursionCount >= MAX_RECURSION_COUNT ) { throw new IllegalStateException ( "Excessive recursion in resolver: " + name ) ; //$NON-NLS-1$ } int idx = name . indexOf ( "!" ) ; //$NON-NLS-1$ if ( idx != - 1 && HAS_PATTERN . matcher ( name . substring ( 0 , idx ) ) . find ( ) ) { result = resolveHasPlugin ( name . substring ( idx + 1 ) , features , dependentFeatures , resolveAliases , evaluateHasPluginConditionals , recursionCount + 1 , sb ) ; result = result . contains ( "?" ) ? ( name . substring ( 0 , idx + 1 ) + result ) : result ; //$NON-NLS-1$ } else if ( resolveAliases && getAliases ( ) != null ) { if ( idx != - 1 ) { // non-has plugin // If the module id specifies a plugin, then process each part individually Matcher m = plugins2 . matcher ( name ) ; StringBuffer sbResult = new StringBuffer ( ) ; while ( m . find ( ) ) { String replacement = _resolve ( m . group ( 0 ) , features , dependentFeatures , true , evaluateHasPluginConditionals , recursionCount + 1 , sb ) ; m . appendReplacement ( sbResult , replacement ) ; } m . appendTail ( sbResult ) ; result = sbResult . toString ( ) ; } String candidate = resolveAliases ( name , features , dependentFeatures , sb ) ; if ( candidate != null && candidate . length ( ) > 0 && ! candidate . equals ( name ) ) { if ( sb != null ) { sb . append ( ", " ) . append ( MessageFormat . format ( //$NON-NLS-1$ Messages . ConfigImpl_6 , new Object [ ] { name + " --> " + candidate } //$NON-NLS-1$ ) ) ; } result = _resolve ( candidate , features , dependentFeatures , true , evaluateHasPluginConditionals , recursionCount + 1 , sb ) ; } } } if ( isTraceLogging ) { log . exiting ( ConfigImpl . class . getName ( ) , sourceMethod , result ) ; } return result ; }
Resolves a module id by applying alias resolution and has! loader plugin resolution .