Example #1
0
 public Collection<? extends ReadableCopySpec> getAllSpecs() {
   List<WrapperCopySpec> specs = new ArrayList<WrapperCopySpec>();
   for (ReadableCopySpec child : spec.getAllSpecs()) {
     specs.add(new WrapperCopySpec(root, child));
   }
   return specs;
 }
Example #2
0
 public List<String> getAllExcludes() {
   List<String> result = new ArrayList<String>();
   if (parentSpec != null) {
     result.addAll(parentSpec.getAllExcludes());
   }
   result.addAll(getExcludes());
   return result;
 }
Example #3
0
 public List<ReadableCopySpec> getAllSpecs() {
   List<ReadableCopySpec> result = new ArrayList<ReadableCopySpec>();
   result.add(this);
   for (ReadableCopySpec childSpec : childSpecs) {
     result.addAll(childSpec.getAllSpecs());
   }
   return result;
 }
Example #4
0
 public CopySpec with(CopySpec... copySpecs) {
   for (CopySpec copySpec : copySpecs) {
     ReadableCopySpec readableCopySpec;
     if (copySpec instanceof CopySpecSource) {
       CopySpecSource copySpecSource = (CopySpecSource) copySpec;
       readableCopySpec = copySpecSource.getRootSpec();
     } else {
       readableCopySpec = (ReadableCopySpec) copySpec;
     }
     childSpecs.add(new WrapperCopySpec(this, readableCopySpec));
   }
   return this;
 }
Example #5
0
 public CopySpecImpl addChild() {
   CopySpecImpl child = new CopySpecImpl(resolver, this);
   childSpecs.add(child);
   return child;
 }
Example #6
0
 public CopySpecImpl addFirst() {
   CopySpecImpl child = new CopySpecImpl(resolver, this);
   childSpecs.add(0, child);
   return child;
 }