Package org.bladerunnerjs.model

Examples of org.bladerunnerjs.model.SourceModule


  private List<String> requirePaths(List<Asset> assets) {
    List<String> requirePaths = new ArrayList<>();
   
    for(Asset asset : assets) {
      SourceModule sourceModule = (SourceModule) asset;
      requirePaths.add(sourceModule.getRequirePaths().get(0));
    }
   
    return requirePaths;
  }
View Full Code Here


  public CircularDependencyException(BundlableNode bundlableNode, Set<SourceModule> sourceModules) throws ModelOperationException {
    super("Circular dependency detected: " + getCircularDependency(bundlableNode, sourceModules));
  }
 
  private static String getCircularDependency(BundlableNode bundlableNode, Set<SourceModule> sourceModules) throws ModelOperationException {
    SourceModule initialSourceModule = sourceModules.iterator().next();
    ArrayList<String> dependencyChain = new ArrayList<>();
    dependencyChain.add(initialSourceModule.getPrimaryRequirePath());
    List<String> circularDependency = null;
   
    for(SourceModule sourceModule : sourceModules) {
      dependencyChain = new ArrayList<>();
      dependencyChain.add(sourceModule.getPrimaryRequirePath());
View Full Code Here

  }
 
  private static List<String> traverseDependencies(BundlableNode bundlableNode, SourceModule sourceModule, Set<SourceModule> sourceModules, List<String> dependencyChain, HashSet<SourceModule> visitedSourceModules) throws ModelOperationException {
    for(Asset dependentAsset : sourceModule.getPreExportDefineTimeDependentAssets(bundlableNode)) {
      if(sourceModules.contains(dependentAsset)) {
        SourceModule dependentSourceModule = (SourceModule) dependentAsset;
        String requirePath = dependentSourceModule.getPrimaryRequirePath();
       
        if(dependencyChain.contains(requirePath)) {
          dependencyChain.add(requirePath);
          return dependencyChain.subList(dependencyChain.indexOf(requirePath), dependencyChain.size());
        }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.model.SourceModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.