コード例 #1
0
  public boolean doCompile(Collection<CompilationUnitBuilder> builders) {
    List<ICompilationUnit> icus = new ArrayList<ICompilationUnit>();
    for (CompilationUnitBuilder builder : builders) {
      addPackages(Shared.getPackageName(builder.getTypeName()).replace('.', '/'));
      icus.add(new Adapter(builder));
    }
    if (icus.isEmpty()) {
      return false;
    }

    compilerImpl = new CompilerImpl();
    compilerImpl.compile(icus.toArray(new ICompilationUnit[icus.size()]));
    compilerImpl = null;
    return true;
  }
コード例 #2
0
 public void addCompiledUnit(CompilationUnit unit) {
   addPackages(Shared.getPackageName(unit.getTypeName()).replace('.', '/'));
   addBinaryTypes(unit.getCompiledClasses());
 }
コード例 #3
0
 @Override
 public char[][] getPackageName() {
   String packageName = Shared.getPackageName(builder.getTypeName());
   return CharOperation.splitOn('.', packageName.toCharArray());
 }