Пример #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;
 }
Пример #2
0
 public List<String> getAllExcludes() {
   List<String> result = new ArrayList<String>();
   if (parentSpec != null) {
     result.addAll(parentSpec.getAllExcludes());
   }
   result.addAll(getExcludes());
   return result;
 }
Пример #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;
 }
Пример #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;
 }
Пример #5
0
 public CopySpecImpl addChild() {
   CopySpecImpl child = new CopySpecImpl(resolver, this);
   childSpecs.add(child);
   return child;
 }
Пример #6
0
 public CopySpecImpl addFirst() {
   CopySpecImpl child = new CopySpecImpl(resolver, this);
   childSpecs.add(0, child);
   return child;
 }