/** * Convenience method to expand properties. * @param content the string to expand * @return the converted string */ protected String expand(final String content) { return getProject().replaceProperties(content); }
/** * Create a path to be configured with the locations of the source * files. * * @return a new Path instance to be configured by the Ant core. */ public Path createSourcepath() { if (sourcePath == null) { sourcePath = new Path(getProject()); } return sourcePath.createPath(); }
/** * Create a Path to be configured with the classpath to use * * @return a new Path instance to be configured with the classpath. */ public Path createClasspath() { if (classpath == null) { classpath = new Path(getProject()); } return classpath.createPath(); }
/** * Create a Path to be configured with the boot classpath * * @return a new Path instance to be configured with the boot classpath. */ public Path createBootclasspath() { if (bootclasspath == null) { bootclasspath = new Path(getProject()); } return bootclasspath.createPath(); }
/** * Set the list of source files to process. * * @param src a comma separated list of source files. */ public void setSourcefiles(final String src) { final StringTokenizer tok = new StringTokenizer(src, ","); while (tok.hasMoreTokens()) { final String f = tok.nextToken(); final SourceFile sf = new SourceFile(); sf.setFile(getProject().resolveFile(f.trim())); addSource(sf); } }
/** * Link to docs at "url" using package list at "url2" * - separate the URLs by using a space character. * * @param src the offline link specification (url and package list) */ public void setLinkoffline(final String src) { final LinkArgument le = createLink(); le.setOffline(true); final String linkOfflineError = "The linkoffline attribute must include" + " a URL and a package-list file location separated by a" + " space"; if (src.trim().isEmpty()) { throw new BuildException(linkOfflineError); } final StringTokenizer tok = new StringTokenizer(src, " ", false); le.setHref(tok.nextToken()); if (!tok.hasMoreTokens()) { throw new BuildException(linkOfflineError); } le.setPackagelistLoc(getProject().resolveFile(tok.nextToken())); }
/** * Set the class that starts the doclet used in generating the * documentation. * * @param docletName the name of the doclet class. */ public void setDoclet(final String docletName) { if (doclet == null) { doclet = new DocletInfo(); doclet.setProject(getProject()); } doclet.setName(docletName); }
/** * Set the classpath used to find the doclet class. * * @param docletPath the doclet classpath. */ public void setDocletPath(final Path docletPath) { if (doclet == null) { doclet = new DocletInfo(); doclet.setProject(getProject()); } doclet.setPath(docletPath); }
/** * Set the classpath used to find the doclet class by reference. * * @param r the reference to the Path instance to use as the doclet * classpath. */ public void setDocletPathRef(final Reference r) { if (doclet == null) { doclet = new DocletInfo(); doclet.setProject(getProject()); } doclet.createPath().setRefid(r); }
ps.setProject(getProject()); if (packageNames.isEmpty()) { ps.createInclude().setName("**"); if (dir.isDirectory()) { final DirSet ds = new DirSet(); ds.setProject(getProject()); ds.setDefaultexcludes(useDefaultExcludes); ds.setDir(dir); final File baseDir = ds.getDir(getProject()); log("scanning " + baseDir + " for packages.", Project.MSG_DEBUG); final DirectoryScanner dsc = ds.getDirectoryScanner(getProject()); boolean containsPackages = false; for (String dir : dsc.getIncludedDirectories()) {
private void doBootPath(final Commandline toExecute) { Path bcp = new Path(getProject()); if (bootclasspath != null) { bcp.append(bootclasspath); } bcp = bcp.concatSystemBootClasspath("ignore"); if (bcp.size() > 0) { toExecute.createArgument().setValue("-bootclasspath"); toExecute.createArgument().setPath(bcp); } }
if (element instanceof TagArgument) { final TagArgument ta = (TagArgument) element; final File tagDir = ta.getDir(getProject()); if (tagDir == null) { ta.getDirectoryScanner(getProject()); for (String file : tagDefScanner.getIncludedFiles()) { final File tagDefFile = new File(tagDir, file); : getProject().getProperty(MagicNames.BUILD_JAVAC_SOURCE); if (sourceArg != null) { toExecute.createArgument().setValue("-source");
if (la.shouldResolveLink()) { final File hrefAsFile = getProject().resolveFile(la.getHref()); if (hrefAsFile.exists()) { try {
final Path sourceDirs = new Path(getProject()); final JavadocOutputStream err = new JavadocOutputStream(Project.MSG_WARN); final Execute exe = new Execute(new PumpStreamHandler(out, err)); exe.setAntRun(getProject());
classpath = new Path(getProject()).concatSystemClasspath("last"); } else { classpath = classpath.concatSystemClasspath("ignore");