Browse Source

javadoc

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@471920 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
b87844c4a7
1 changed files with 78 additions and 3 deletions
  1. +78
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java

+ 78
- 3
src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java View File

@@ -77,6 +77,7 @@ public class JspC extends MatchingTask {
private String iepluginid;
private boolean mapped;
private int verbose = 0;
// CheckStyle:VisibilityModifier OFF - bc
protected Vector compileList = new Vector();
Vector javaFiles = new Vector();

@@ -112,8 +113,11 @@ public class JspC extends MatchingTask {
private static final String FAIL_MSG
= "Compile failed, messages should have been provided.";

// CheckStyle:VisibilityModifier ON

/**
* Set the path for source JSP files.
* @param srcDir the source path.
*/
public void setSrcDir(Path srcDir) {
if (src == null) {
@@ -122,6 +126,11 @@ public class JspC extends MatchingTask {
src.append(srcDir);
}
}

/**
* Get the source dir.
* @return the source path.
*/
public Path getSrcDir() {
return src;
}
@@ -129,31 +138,48 @@ public class JspC extends MatchingTask {
/**
* Set the destination directory into which the JSP source
* files should be compiled.
* @param destDir the destination directory.
*/
public void setDestdir(File destDir) {
this.destDir = destDir;
}

/**
* Get the destination directory.
* @return the directory.
*/
public File getDestdir() {
return destDir;
}

/**
* Set the name of the package the compiled jsp files should be in.
* @param pkg the name of the package.
*/
public void setPackage(String pkg) {
this.packageName = pkg;
}

/**
* Get the name of the package.
* @return the package.
*/
public String getPackage() {
return packageName;
}

/**
* Set the verbose level of the compiler
* @param i the verbose level to use.
*/
public void setVerbose(int i) {
verbose = i;
}

/**
* Get the verbose level.
* @return the level.
*/
public int getVerbose() {
return verbose;
}
@@ -161,22 +187,29 @@ public class JspC extends MatchingTask {
/**
* Whether or not the build should halt if compilation fails.
* Defaults to <code>true</code>.
* @param fail a <code>boolean</code> value.
*/
public void setFailonerror(boolean fail) {
failOnError = fail;
}
/**
* Gets the failonerror flag.
* @return the flag.
*/
public boolean getFailonerror() {
return failOnError;
}

/**
* Get the IE CLASSID value.
* @return the value.
*/
public String getIeplugin() {
return iepluginid;
}
/**
* Java Plugin CLASSID for Internet Explorer
* @param iepluginid the id to use.
*/
public void setIeplugin(String iepluginid) {
this.iepluginid = iepluginid;
@@ -194,6 +227,7 @@ public class JspC extends MatchingTask {
/**
* If true, generate separate write() calls for each HTML line
* in the JSP.
* @param mapped a <code>boolean</code> value.
*/
public void setMapped(boolean mapped) {
this.mapped = mapped;
@@ -210,6 +244,10 @@ public class JspC extends MatchingTask {
log("Uribase is currently an unused parameter", Project.MSG_WARN);
}

/**
* Get the uri base value.
* @return the value.
*/
public File getUribase() {
return uriroot;
}
@@ -224,6 +262,10 @@ public class JspC extends MatchingTask {
this.uriroot = uriroot;
}

/**
* Get the uri root value.
* @return the value.
*/
public File getUriroot() {
return uriroot;
}
@@ -231,6 +273,7 @@ public class JspC extends MatchingTask {

/**
* Set the classpath to be used for this compilation.
* @param cp the path to be used.
*/
public void setClasspath(Path cp) {
if (classpath == null) {
@@ -242,6 +285,7 @@ public class JspC extends MatchingTask {

/**
* Adds a path to the classpath.
* @return a path to be configured.
*/
public Path createClasspath() {
if (classpath == null) {
@@ -252,16 +296,23 @@ public class JspC extends MatchingTask {

/**
* Adds a reference to a classpath defined elsewhere
* @param r a reference to a classpath.
*/
public void setClasspathRef(Reference r) {
createClasspath().setRefid(r);
}

/**
* Get the classpath.
* @return the classpath.
*/
public Path getClasspath() {
return classpath;
}

/**
* Set the classpath to be used to find this compiler adapter
* @param cp the compiler classpath.
*/
public void setCompilerclasspath(Path cp) {
if (compilerClasspath == null) {
@@ -273,6 +324,7 @@ public class JspC extends MatchingTask {

/**
* get the classpath used to find the compiler adapter
* @return the compiler classpath.
*/
public Path getCompilerclasspath() {
return compilerClasspath;
@@ -280,6 +332,7 @@ public class JspC extends MatchingTask {

/**
* Support nested compiler classpath, used to locate compiler adapter
* @return a path to be configured.
*/
public Path createCompilerclasspath() {
if (compilerClasspath == null) {
@@ -314,6 +367,10 @@ public class JspC extends MatchingTask {
this.webinc = webinc;
}

/**
* Get the webinc attribute.
* @return the webinc attribute.
*/
public File getWebinc() {
return this.webinc;
}
@@ -322,6 +379,7 @@ public class JspC extends MatchingTask {
* Adds a single webapp.
*
* @param webappParam add a web app parameter
* @throws BuildException if more than one webapp is specified.
*/
public void addWebApp(WebAppParameter webappParam)
throws BuildException {
@@ -333,12 +391,17 @@ public class JspC extends MatchingTask {
}
}

/**
* Get the web app.
* @return the web app attribute.
*/
public WebAppParameter getWebApp() {
return webApp;
}

/**
* Class name of a JSP compiler adapter.
* @param compiler the compiler class name.
*/
public void setCompiler(String compiler) {
this.compilerName = compiler;
@@ -346,6 +409,7 @@ public class JspC extends MatchingTask {

/**
* get the list of files to compile
* @return the list of files.
*/
public Vector getCompileList() {
return compileList;
@@ -354,6 +418,7 @@ public class JspC extends MatchingTask {
/**
* execute by building up a list of files that
* have changed and hand them off to a jsp compiler
* @throws BuildException on error.
*/
public void execute()
throws BuildException {
@@ -484,8 +549,13 @@ public class JspC extends MatchingTask {
/**
* Scans the directory looking for source files to be compiled.
* The results are returned in the class variable compileList
* @param srcDir the source directory.
* @param dest the destination directory.
* @param mangler the jsp filename mangler.
* @param files the file names to mangle.
*/
protected void scanDir(File srcDir, File dest, JspMangler mangler, String files[]) {
protected void scanDir(
File srcDir, File dest, JspMangler mangler, String[] files) {

long now = (new Date()).getTime();

@@ -554,7 +624,11 @@ public class JspC extends MatchingTask {


/**
* get a filename from our jsp file
* get a filename from our jsp file.
* @param mangler the jsp filename managler.
* @param srcFile the source file.
* @param srcDir the source directory.
* @param dest the destination directory.
* @todo support packages and subdirs
*/
protected File mapToJavaFile(JspMangler mangler, File srcFile, File srcDir, File dest) {
@@ -596,14 +670,15 @@ public class JspC extends MatchingTask {

/**
* query current directory
* @return the directory.
*/

public File getDirectory() {
return directory;
}

/**
* set directory; alternate syntax
* @param directory the base dir.
*/
public void setBaseDir(File directory) {
this.directory = directory;


Loading…
Cancel
Save