コード例 #1
0
 public boolean getMayHaveSources() {
   // TODO:DAZ This doesn't take into account build dependencies of the
   // SourceDirectorySet.
   // Should just ditch SourceDirectorySet from here since it's not really
   // a great model, and drags in too much baggage.
   return generated || !source.isEmpty();
 }
コード例 #2
0
  private File _getSrcDir(SourceDirectorySet sourceDirectorySet) {
    Set<File> srcDirs = sourceDirectorySet.getSrcDirs();

    Iterator<File> iterator = srcDirs.iterator();

    return iterator.next();
  }
コード例 #3
0
 private BaseLanguageSourceSet(SourceSetInfo info) {
   if (info == null) {
     throw new ModelInstantiationException(
         "Direct instantiation of a BaseLanguageSourceSet is not permitted. Use a LanguageTypeBuilder instead.");
   }
   this.name = info.name;
   this.parentName = info.parentName;
   this.typeName = info.typeName;
   this.fullName = info.parentName + StringUtils.capitalize(name);
   this.source = new DefaultSourceDirectorySet("source", info.fileResolver);
   this.fileResolver = info.fileResolver;
   super.builtBy(source.getBuildDependencies());
 }