State( DependencyNode root, Map<?, ?> conflictIds, int conflictIdCount, DependencyGraphTransformationContext context ) throws RepositoryException { this.conflictIds = conflictIds; verbose = ConfigUtils.getBoolean( context.getSession(), false, CONFIG_PROP_VERBOSE ); potentialAncestorIds = new HashSet<Object>( conflictIdCount * 2 ); resolvedIds = new HashMap<Object, DependencyNode>( conflictIdCount * 2 ); items = new ArrayList<ConflictItem>( 256 ); infos = new IdentityHashMap<List<DependencyNode>, NodeInfo>( 64 ); stack = new IdentityHashMap<List<DependencyNode>, Object>( 64 ); parentNodes = new ArrayList<DependencyNode>( 64 ); parentScopes = new ArrayList<String>( 64 ); parentOptionals = new ArrayList<Boolean>( 64 ); parentInfos = new ArrayList<NodeInfo>( 64 ); conflictCtx = new ConflictContext( root, conflictIds, items ); scopeCtx = new ScopeContext( null, null ); versionSelector = ConflictResolver.this.versionSelector.getInstance( root, context ); scopeSelector = ConflictResolver.this.scopeSelector.getInstance( root, context ); scopeDeriver = ConflictResolver.this.scopeDeriver.getInstance( root, context ); optionalitySelector = ConflictResolver.this.optionalitySelector.getInstance( root, context ); }
State( DependencyNode root, Map<?, ?> conflictIds, int conflictIdCount, DependencyGraphTransformationContext context ) throws RepositoryException { this.conflictIds = conflictIds; verbose = ConfigUtils.getBoolean( context.getSession(), false, CONFIG_PROP_VERBOSE ); potentialAncestorIds = new HashSet<Object>( conflictIdCount * 2 ); resolvedIds = new HashMap<Object, DependencyNode>( conflictIdCount * 2 ); items = new ArrayList<ConflictItem>( 256 ); infos = new IdentityHashMap<List<DependencyNode>, NodeInfo>( 64 ); stack = new IdentityHashMap<List<DependencyNode>, Object>( 64 ); parentNodes = new ArrayList<DependencyNode>( 64 ); parentScopes = new ArrayList<String>( 64 ); parentOptionals = new ArrayList<Boolean>( 64 ); parentInfos = new ArrayList<NodeInfo>( 64 ); conflictCtx = new ConflictContext( root, conflictIds, items ); scopeCtx = new ScopeContext( null, null ); versionSelector = ConflictResolver.this.versionSelector.getInstance( root, context ); scopeSelector = ConflictResolver.this.scopeSelector.getInstance( root, context ); scopeDeriver = ConflictResolver.this.scopeDeriver.getInstance( root, context ); optionalitySelector = ConflictResolver.this.optionalitySelector.getInstance( root, context ); }
private String deriveScope( DependencyNode node, Object conflictId ) throws RepositoryException { if ( ( node.getManagedBits() & DependencyNode.MANAGED_SCOPE ) != 0 || ( conflictId != null && resolvedIds.containsKey( conflictId ) ) ) { return scope( node.getDependency() ); } int depth = parentNodes.size(); scopes( depth, node.getDependency() ); if ( depth > 0 ) { scopeDeriver.deriveScope( scopeCtx ); } return scopeCtx.derivedScope; }
private String deriveScope( DependencyNode node, Object conflictId ) throws RepositoryException { if ( ( node.getManagedBits() & DependencyNode.MANAGED_SCOPE ) != 0 || ( conflictId != null && resolvedIds.containsKey( conflictId ) ) ) { return scope( node.getDependency() ); } int depth = parentNodes.size(); scopes( depth, node.getDependency() ); if ( depth > 0 ) { scopeDeriver.deriveScope( scopeCtx ); } return scopeCtx.derivedScope; }