org.apache.tools.ant.taskdefs.Javac.getSrcdir()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中org.apache.tools.ant.taskdefs.Javac.getSrcdir()方法的一些代码示例,展示了Javac.getSrcdir()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Javac.getSrcdir()方法的具体详情如下:
包路径:org.apache.tools.ant.taskdefs.Javac
类名称:Javac
方法名:getSrcdir

Javac.getSrcdir介绍

[英]Gets the source dirs to find the source java files.
[中]获取用于查找源java文件的源目录。

代码示例

代码示例来源:origin: org.apache.ant/ant

public void setJavac(final Javac attributes) {
  this.attributes = attributes;
  src = attributes.getSrcdir();
  destDir = attributes.getDestdir();
  encoding = attributes.getEncoding();

代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui

public IJavaProject createJavaProjectFromJavacNode(String projectName, Javac javacTask, IProgressMonitor monitor) throws CoreException {
  try {
    IJavaProject javaProject = createJavaProject(projectName, monitor);
    File destDir = javacTask.getDestdir();
    String destDirName = destDir == null ? null : destDir.getName();
    org.apache.tools.ant.types.Path sourceDirs = javacTask.getSrcdir();
    createSourceDirectories(destDir, destDirName, sourceDirs, javaProject, monitor);
    // add rt.jar
    addVariableEntry(javaProject, new Path(JavaRuntime.JRELIB_VARIABLE), new Path(JavaRuntime.JRESRC_VARIABLE), new Path(JavaRuntime.JRESRCROOT_VARIABLE), monitor);
    setClasspath(javacTask, javaProject, monitor);
    javaProject.getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor);
    return javaProject;
  }
  catch (BuildException be) {
    IStatus status = new Status(IStatus.ERROR, AntUIPlugin.PI_ANTUI, IStatus.OK, be.getLocalizedMessage(), be);
    throw new CoreException(status);
  }
}

代码示例来源:origin: stackoverflow.com

final Path sourcepath = task.getSrcdir();
FindBugsTask fbtask = new FindBugsTask();
System.out.println ("Trying FindBugs");

相关文章