setX()/createX() and setX()/addX() method pairs into a single setX() or addX() method. �I've started with Path, to get rid of some its inertia. Submitted by: "Adam Murdoch" <adammurdoch_ml@yahoo.com> git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270776 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -48,10 +48,20 @@ public class Available | |||
| } | |||
| } | |||
| public void setClasspath( Path classpath ) | |||
| /** | |||
| * Adds a classpath element. | |||
| */ | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| createClasspath().append( classpath ); | |||
| if ( m_classpath == null ) | |||
| { | |||
| m_classpath = classpath; | |||
| } | |||
| else | |||
| { | |||
| m_classpath.addPath(classpath); | |||
| } | |||
| } | |||
| public void setFile( String file ) | |||
| @@ -59,12 +69,6 @@ public class Available | |||
| m_file = file; | |||
| } | |||
| public void setFilepath( Path filepath ) | |||
| throws TaskException | |||
| { | |||
| createFilepath().append( filepath ); | |||
| } | |||
| public void setProperty( String property ) | |||
| { | |||
| m_property = property; | |||
| @@ -85,30 +89,20 @@ public class Available | |||
| m_value = value; | |||
| } | |||
| public Path createClasspath() | |||
| /** | |||
| * Adds a file search path element. | |||
| */ | |||
| public void addFilepath( Path path ) | |||
| throws TaskException | |||
| { | |||
| if( m_classpath == null ) | |||
| if( m_filepath == null ) | |||
| { | |||
| m_classpath = new Path(); | |||
| m_filepath = path; | |||
| } | |||
| Path path1 = m_classpath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public Path createFilepath() | |||
| throws TaskException | |||
| { | |||
| if( m_filepath == null ) | |||
| else | |||
| { | |||
| m_filepath = new Path(); | |||
| m_filepath.addPath( path ); | |||
| } | |||
| Path path1 = m_filepath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public boolean eval() | |||
| @@ -45,12 +45,12 @@ public class Java | |||
| } | |||
| /** | |||
| * Set the classpath to be used for this compilation. | |||
| * Add a classpath element. | |||
| */ | |||
| public void setClasspath( final Path classpath ) | |||
| public void addClasspath( final Path classpath ) | |||
| throws TaskException | |||
| { | |||
| createClasspath().append( classpath ); | |||
| m_cmdl.createClasspath().addPath( classpath ); | |||
| } | |||
| /** | |||
| @@ -111,18 +111,6 @@ public class Java | |||
| return m_cmdl.createArgument(); | |||
| } | |||
| /** | |||
| * Creates a nested classpath element | |||
| */ | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| Path path1 = m_cmdl.createClasspath(); | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Creates a nested jvmarg element. | |||
| */ | |||
| @@ -88,11 +88,12 @@ public class Javac extends MatchingTask | |||
| private String target; | |||
| /** | |||
| * Sets the bootclasspath that will be used to compile the classes against. | |||
| * Adds an element to the bootclasspath that will be used to compile the | |||
| * classes against. | |||
| * | |||
| * @param bootclasspath The new Bootclasspath value | |||
| */ | |||
| public void setBootclasspath( Path bootclasspath ) | |||
| public void addBootclasspath( Path bootclasspath ) | |||
| throws TaskException | |||
| { | |||
| if( this.bootclasspath == null ) | |||
| @@ -101,16 +102,16 @@ public class Javac extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| this.bootclasspath.append( bootclasspath ); | |||
| this.bootclasspath.addPath( bootclasspath ); | |||
| } | |||
| } | |||
| /** | |||
| * Set the classpath to be used for this compilation. | |||
| * Adds an element to the classpath to be used for this compilation. | |||
| * | |||
| * @param classpath The new Classpath value | |||
| */ | |||
| public void setClasspath( Path classpath ) | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| if( compileClasspath == null ) | |||
| @@ -119,7 +120,7 @@ public class Javac extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| compileClasspath.append( classpath ); | |||
| compileClasspath.addPath( classpath ); | |||
| } | |||
| } | |||
| @@ -185,11 +186,12 @@ public class Javac extends MatchingTask | |||
| } | |||
| /** | |||
| * Sets the extension directories that will be used during the compilation. | |||
| * Adds an element to the extension directories that will be used during | |||
| * the compilation. | |||
| * | |||
| * @param extdirs The new Extdirs value | |||
| */ | |||
| public void setExtdirs( Path extdirs ) | |||
| public void addExtdirs( Path extdirs ) | |||
| throws TaskException | |||
| { | |||
| if( this.extdirs == null ) | |||
| @@ -198,7 +200,7 @@ public class Javac extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| this.extdirs.append( extdirs ); | |||
| this.extdirs.addPath( extdirs ); | |||
| } | |||
| } | |||
| @@ -322,11 +324,11 @@ public class Javac extends MatchingTask | |||
| } | |||
| /** | |||
| * Set the source dirs to find the source Java files. | |||
| * Adds an element to the source dirs to find the source Java files. | |||
| * | |||
| * @param srcDir The new Srcdir value | |||
| */ | |||
| public void setSrcdir( Path srcDir ) | |||
| public void addSrcdir( Path srcDir ) | |||
| throws TaskException | |||
| { | |||
| if( src == null ) | |||
| @@ -335,7 +337,7 @@ public class Javac extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| src.append( srcDir ); | |||
| src.addPath( srcDir ); | |||
| } | |||
| } | |||
| @@ -630,42 +632,6 @@ public class Javac extends MatchingTask | |||
| "extJavac".equals( getProperty( "build.compiler" ) ); | |||
| } | |||
| /** | |||
| * Maybe creates a nested classpath element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createBootclasspath() | |||
| throws TaskException | |||
| { | |||
| if( bootclasspath == null ) | |||
| { | |||
| bootclasspath = new Path(); | |||
| } | |||
| Path path1 = bootclasspath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Maybe creates a nested classpath element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| if( compileClasspath == null ) | |||
| { | |||
| compileClasspath = new Path(); | |||
| } | |||
| Path path1 = compileClasspath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Adds an implementation specific command line argument. | |||
| * | |||
| @@ -679,42 +645,6 @@ public class Javac extends MatchingTask | |||
| return arg; | |||
| } | |||
| /** | |||
| * Maybe creates a nested classpath element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createExtdirs() | |||
| throws TaskException | |||
| { | |||
| if( extdirs == null ) | |||
| { | |||
| extdirs = new Path(); | |||
| } | |||
| Path path1 = extdirs; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Create a nested src element for multiple source path support. | |||
| * | |||
| * @return a nested src element. | |||
| */ | |||
| public Path createSrc() | |||
| throws TaskException | |||
| { | |||
| if( src == null ) | |||
| { | |||
| src = new Path(); | |||
| } | |||
| Path path1 = src; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Executes the task. | |||
| * | |||
| @@ -96,19 +96,19 @@ public class PathConvert extends Task | |||
| } | |||
| /** | |||
| * Create a nested PATH element | |||
| * Adds a PATH element | |||
| */ | |||
| public Path createPath() | |||
| public void addPath( Path path ) | |||
| throws TaskException | |||
| { | |||
| if( m_path == null ) | |||
| { | |||
| m_path = new Path(); | |||
| m_path = path; | |||
| } | |||
| else | |||
| { | |||
| m_path.addPath( path ); | |||
| } | |||
| Path path1 = m_path; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public void execute() | |||
| @@ -35,7 +35,7 @@ public class Property | |||
| private String m_resource; | |||
| private String m_value; | |||
| public void setClasspath( Path classpath ) | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| if( m_classpath == null ) | |||
| @@ -44,7 +44,7 @@ public class Property | |||
| } | |||
| else | |||
| { | |||
| m_classpath.append( classpath ); | |||
| m_classpath.addPath( classpath ); | |||
| } | |||
| } | |||
| @@ -68,19 +68,6 @@ public class Property | |||
| m_value = value; | |||
| } | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| if( m_classpath == null ) | |||
| { | |||
| m_classpath = new Path(); | |||
| } | |||
| Path path1 = m_classpath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public void execute() | |||
| throws TaskException | |||
| { | |||
| @@ -102,11 +102,11 @@ public class Rmic extends MatchingTask | |||
| } | |||
| /** | |||
| * Set the classpath to be used for this compilation. | |||
| * Add an element to the classpath to be used for this compilation. | |||
| * | |||
| * @param classpath The new Classpath value | |||
| */ | |||
| public void setClasspath( Path classpath ) | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| if( compileClasspath == null ) | |||
| @@ -115,7 +115,7 @@ public class Rmic extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| compileClasspath.append( classpath ); | |||
| compileClasspath.addPath( classpath ); | |||
| } | |||
| } | |||
| @@ -130,11 +130,12 @@ public class Rmic extends MatchingTask | |||
| } | |||
| /** | |||
| * Sets the extension directories that will be used during the compilation. | |||
| * Adds an element to the extension directories that will be used during | |||
| * the compilation. | |||
| * | |||
| * @param extdirs The new Extdirs value | |||
| */ | |||
| public void setExtdirs( Path extdirs ) | |||
| public void addExtdirs( Path extdirs ) | |||
| throws TaskException | |||
| { | |||
| if( this.extdirs == null ) | |||
| @@ -143,7 +144,7 @@ public class Rmic extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| this.extdirs.append( extdirs ); | |||
| this.extdirs.addPath( extdirs ); | |||
| } | |||
| } | |||
| @@ -459,42 +460,6 @@ public class Rmic extends MatchingTask | |||
| return false; | |||
| } | |||
| /** | |||
| * Creates a nested classpath element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| if( compileClasspath == null ) | |||
| { | |||
| compileClasspath = new Path(); | |||
| } | |||
| Path path1 = compileClasspath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Maybe creates a nested extdirs element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createExtdirs() | |||
| throws TaskException | |||
| { | |||
| if( extdirs == null ) | |||
| { | |||
| extdirs = new Path(); | |||
| } | |||
| Path path1 = extdirs; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public void execute() | |||
| throws TaskException | |||
| { | |||
| @@ -162,11 +162,11 @@ public class SQLExec | |||
| } | |||
| /** | |||
| * Set the classpath for loading the driver. | |||
| * Adds an element to the classpath for loading the driver. | |||
| * | |||
| * @param classpath The new Classpath value | |||
| */ | |||
| public void setClasspath( Path classpath ) | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| if( this.classpath == null ) | |||
| @@ -175,7 +175,7 @@ public class SQLExec | |||
| } | |||
| else | |||
| { | |||
| this.classpath.append( classpath ); | |||
| this.classpath.addPath( classpath ); | |||
| } | |||
| } | |||
| @@ -345,24 +345,6 @@ public class SQLExec | |||
| this.sqlCommand += sql; | |||
| } | |||
| /** | |||
| * Create the classpath for loading the driver. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| if( this.classpath == null ) | |||
| { | |||
| this.classpath = new Path(); | |||
| } | |||
| Path path1 = this.classpath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Set the sql command to execute | |||
| * | |||
| @@ -215,7 +215,7 @@ public class BorlandGenerateClient extends Task | |||
| //classpath | |||
| //add at the end of the classpath | |||
| //the system classpath in order to find the tools.jar file | |||
| execTask.setClasspath( classpath.concatSystemClasspath() ); | |||
| execTask.addClasspath( classpath.concatSystemClasspath() ); | |||
| execTask.setFork( true ); | |||
| execTask.createArg().setValue( "generateclient" ); | |||
| @@ -229,7 +229,7 @@ public class WLJspc extends MatchingTask | |||
| //helperTask.clearArgs(); | |||
| helperTask.createArg().setValue( arg ); | |||
| helperTask.setClasspath( compileClasspath ); | |||
| helperTask.addClasspath( compileClasspath ); | |||
| if( helperTask.executeJava() != 0 ) | |||
| { | |||
| getLogger().warn( files[ i ] + " failed to compile" ); | |||
| @@ -37,7 +37,7 @@ public class JasperC | |||
| //FIXME | |||
| Java java = null;//(Java)( getJspc().getProject() ).createTask( "java" ); | |||
| if( getJspc().getClasspath() != null ) | |||
| java.setClasspath( getJspc().getClasspath() ); | |||
| java.addClasspath( getJspc().getClasspath() ); | |||
| java.setClassname( "org.apache.jasper.JspC" ); | |||
| String args[] = cmd.getArguments(); | |||
| for( int i = 0; i < args.length; i++ ) | |||
| @@ -48,10 +48,20 @@ public class Available | |||
| } | |||
| } | |||
| public void setClasspath( Path classpath ) | |||
| /** | |||
| * Adds a classpath element. | |||
| */ | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| createClasspath().append( classpath ); | |||
| if ( m_classpath == null ) | |||
| { | |||
| m_classpath = classpath; | |||
| } | |||
| else | |||
| { | |||
| m_classpath.addPath(classpath); | |||
| } | |||
| } | |||
| public void setFile( String file ) | |||
| @@ -59,12 +69,6 @@ public class Available | |||
| m_file = file; | |||
| } | |||
| public void setFilepath( Path filepath ) | |||
| throws TaskException | |||
| { | |||
| createFilepath().append( filepath ); | |||
| } | |||
| public void setProperty( String property ) | |||
| { | |||
| m_property = property; | |||
| @@ -85,30 +89,20 @@ public class Available | |||
| m_value = value; | |||
| } | |||
| public Path createClasspath() | |||
| /** | |||
| * Adds a file search path element. | |||
| */ | |||
| public void addFilepath( Path path ) | |||
| throws TaskException | |||
| { | |||
| if( m_classpath == null ) | |||
| if( m_filepath == null ) | |||
| { | |||
| m_classpath = new Path(); | |||
| m_filepath = path; | |||
| } | |||
| Path path1 = m_classpath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public Path createFilepath() | |||
| throws TaskException | |||
| { | |||
| if( m_filepath == null ) | |||
| else | |||
| { | |||
| m_filepath = new Path(); | |||
| m_filepath.addPath( path ); | |||
| } | |||
| Path path1 = m_filepath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public boolean eval() | |||
| @@ -45,12 +45,12 @@ public class Java | |||
| } | |||
| /** | |||
| * Set the classpath to be used for this compilation. | |||
| * Add a classpath element. | |||
| */ | |||
| public void setClasspath( final Path classpath ) | |||
| public void addClasspath( final Path classpath ) | |||
| throws TaskException | |||
| { | |||
| createClasspath().append( classpath ); | |||
| m_cmdl.createClasspath().addPath( classpath ); | |||
| } | |||
| /** | |||
| @@ -111,18 +111,6 @@ public class Java | |||
| return m_cmdl.createArgument(); | |||
| } | |||
| /** | |||
| * Creates a nested classpath element | |||
| */ | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| Path path1 = m_cmdl.createClasspath(); | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Creates a nested jvmarg element. | |||
| */ | |||
| @@ -88,11 +88,12 @@ public class Javac extends MatchingTask | |||
| private String target; | |||
| /** | |||
| * Sets the bootclasspath that will be used to compile the classes against. | |||
| * Adds an element to the bootclasspath that will be used to compile the | |||
| * classes against. | |||
| * | |||
| * @param bootclasspath The new Bootclasspath value | |||
| */ | |||
| public void setBootclasspath( Path bootclasspath ) | |||
| public void addBootclasspath( Path bootclasspath ) | |||
| throws TaskException | |||
| { | |||
| if( this.bootclasspath == null ) | |||
| @@ -101,16 +102,16 @@ public class Javac extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| this.bootclasspath.append( bootclasspath ); | |||
| this.bootclasspath.addPath( bootclasspath ); | |||
| } | |||
| } | |||
| /** | |||
| * Set the classpath to be used for this compilation. | |||
| * Adds an element to the classpath to be used for this compilation. | |||
| * | |||
| * @param classpath The new Classpath value | |||
| */ | |||
| public void setClasspath( Path classpath ) | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| if( compileClasspath == null ) | |||
| @@ -119,7 +120,7 @@ public class Javac extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| compileClasspath.append( classpath ); | |||
| compileClasspath.addPath( classpath ); | |||
| } | |||
| } | |||
| @@ -185,11 +186,12 @@ public class Javac extends MatchingTask | |||
| } | |||
| /** | |||
| * Sets the extension directories that will be used during the compilation. | |||
| * Adds an element to the extension directories that will be used during | |||
| * the compilation. | |||
| * | |||
| * @param extdirs The new Extdirs value | |||
| */ | |||
| public void setExtdirs( Path extdirs ) | |||
| public void addExtdirs( Path extdirs ) | |||
| throws TaskException | |||
| { | |||
| if( this.extdirs == null ) | |||
| @@ -198,7 +200,7 @@ public class Javac extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| this.extdirs.append( extdirs ); | |||
| this.extdirs.addPath( extdirs ); | |||
| } | |||
| } | |||
| @@ -322,11 +324,11 @@ public class Javac extends MatchingTask | |||
| } | |||
| /** | |||
| * Set the source dirs to find the source Java files. | |||
| * Adds an element to the source dirs to find the source Java files. | |||
| * | |||
| * @param srcDir The new Srcdir value | |||
| */ | |||
| public void setSrcdir( Path srcDir ) | |||
| public void addSrcdir( Path srcDir ) | |||
| throws TaskException | |||
| { | |||
| if( src == null ) | |||
| @@ -335,7 +337,7 @@ public class Javac extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| src.append( srcDir ); | |||
| src.addPath( srcDir ); | |||
| } | |||
| } | |||
| @@ -630,42 +632,6 @@ public class Javac extends MatchingTask | |||
| "extJavac".equals( getProperty( "build.compiler" ) ); | |||
| } | |||
| /** | |||
| * Maybe creates a nested classpath element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createBootclasspath() | |||
| throws TaskException | |||
| { | |||
| if( bootclasspath == null ) | |||
| { | |||
| bootclasspath = new Path(); | |||
| } | |||
| Path path1 = bootclasspath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Maybe creates a nested classpath element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| if( compileClasspath == null ) | |||
| { | |||
| compileClasspath = new Path(); | |||
| } | |||
| Path path1 = compileClasspath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Adds an implementation specific command line argument. | |||
| * | |||
| @@ -679,42 +645,6 @@ public class Javac extends MatchingTask | |||
| return arg; | |||
| } | |||
| /** | |||
| * Maybe creates a nested classpath element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createExtdirs() | |||
| throws TaskException | |||
| { | |||
| if( extdirs == null ) | |||
| { | |||
| extdirs = new Path(); | |||
| } | |||
| Path path1 = extdirs; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Create a nested src element for multiple source path support. | |||
| * | |||
| * @return a nested src element. | |||
| */ | |||
| public Path createSrc() | |||
| throws TaskException | |||
| { | |||
| if( src == null ) | |||
| { | |||
| src = new Path(); | |||
| } | |||
| Path path1 = src; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Executes the task. | |||
| * | |||
| @@ -96,19 +96,19 @@ public class PathConvert extends Task | |||
| } | |||
| /** | |||
| * Create a nested PATH element | |||
| * Adds a PATH element | |||
| */ | |||
| public Path createPath() | |||
| public void addPath( Path path ) | |||
| throws TaskException | |||
| { | |||
| if( m_path == null ) | |||
| { | |||
| m_path = new Path(); | |||
| m_path = path; | |||
| } | |||
| else | |||
| { | |||
| m_path.addPath( path ); | |||
| } | |||
| Path path1 = m_path; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public void execute() | |||
| @@ -35,7 +35,7 @@ public class Property | |||
| private String m_resource; | |||
| private String m_value; | |||
| public void setClasspath( Path classpath ) | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| if( m_classpath == null ) | |||
| @@ -44,7 +44,7 @@ public class Property | |||
| } | |||
| else | |||
| { | |||
| m_classpath.append( classpath ); | |||
| m_classpath.addPath( classpath ); | |||
| } | |||
| } | |||
| @@ -68,19 +68,6 @@ public class Property | |||
| m_value = value; | |||
| } | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| if( m_classpath == null ) | |||
| { | |||
| m_classpath = new Path(); | |||
| } | |||
| Path path1 = m_classpath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public void execute() | |||
| throws TaskException | |||
| { | |||
| @@ -102,11 +102,11 @@ public class Rmic extends MatchingTask | |||
| } | |||
| /** | |||
| * Set the classpath to be used for this compilation. | |||
| * Add an element to the classpath to be used for this compilation. | |||
| * | |||
| * @param classpath The new Classpath value | |||
| */ | |||
| public void setClasspath( Path classpath ) | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| if( compileClasspath == null ) | |||
| @@ -115,7 +115,7 @@ public class Rmic extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| compileClasspath.append( classpath ); | |||
| compileClasspath.addPath( classpath ); | |||
| } | |||
| } | |||
| @@ -130,11 +130,12 @@ public class Rmic extends MatchingTask | |||
| } | |||
| /** | |||
| * Sets the extension directories that will be used during the compilation. | |||
| * Adds an element to the extension directories that will be used during | |||
| * the compilation. | |||
| * | |||
| * @param extdirs The new Extdirs value | |||
| */ | |||
| public void setExtdirs( Path extdirs ) | |||
| public void addExtdirs( Path extdirs ) | |||
| throws TaskException | |||
| { | |||
| if( this.extdirs == null ) | |||
| @@ -143,7 +144,7 @@ public class Rmic extends MatchingTask | |||
| } | |||
| else | |||
| { | |||
| this.extdirs.append( extdirs ); | |||
| this.extdirs.addPath( extdirs ); | |||
| } | |||
| } | |||
| @@ -459,42 +460,6 @@ public class Rmic extends MatchingTask | |||
| return false; | |||
| } | |||
| /** | |||
| * Creates a nested classpath element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| if( compileClasspath == null ) | |||
| { | |||
| compileClasspath = new Path(); | |||
| } | |||
| Path path1 = compileClasspath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Maybe creates a nested extdirs element. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createExtdirs() | |||
| throws TaskException | |||
| { | |||
| if( extdirs == null ) | |||
| { | |||
| extdirs = new Path(); | |||
| } | |||
| Path path1 = extdirs; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| public void execute() | |||
| throws TaskException | |||
| { | |||
| @@ -162,11 +162,11 @@ public class SQLExec | |||
| } | |||
| /** | |||
| * Set the classpath for loading the driver. | |||
| * Adds an element to the classpath for loading the driver. | |||
| * | |||
| * @param classpath The new Classpath value | |||
| */ | |||
| public void setClasspath( Path classpath ) | |||
| public void addClasspath( Path classpath ) | |||
| throws TaskException | |||
| { | |||
| if( this.classpath == null ) | |||
| @@ -175,7 +175,7 @@ public class SQLExec | |||
| } | |||
| else | |||
| { | |||
| this.classpath.append( classpath ); | |||
| this.classpath.addPath( classpath ); | |||
| } | |||
| } | |||
| @@ -345,24 +345,6 @@ public class SQLExec | |||
| this.sqlCommand += sql; | |||
| } | |||
| /** | |||
| * Create the classpath for loading the driver. | |||
| * | |||
| * @return Description of the Returned Value | |||
| */ | |||
| public Path createClasspath() | |||
| throws TaskException | |||
| { | |||
| if( this.classpath == null ) | |||
| { | |||
| this.classpath = new Path(); | |||
| } | |||
| Path path1 = this.classpath; | |||
| final Path path = new Path(); | |||
| path1.addPath( path ); | |||
| return path; | |||
| } | |||
| /** | |||
| * Set the sql command to execute | |||
| * | |||
| @@ -215,7 +215,7 @@ public class BorlandGenerateClient extends Task | |||
| //classpath | |||
| //add at the end of the classpath | |||
| //the system classpath in order to find the tools.jar file | |||
| execTask.setClasspath( classpath.concatSystemClasspath() ); | |||
| execTask.addClasspath( classpath.concatSystemClasspath() ); | |||
| execTask.setFork( true ); | |||
| execTask.createArg().setValue( "generateclient" ); | |||
| @@ -229,7 +229,7 @@ public class WLJspc extends MatchingTask | |||
| //helperTask.clearArgs(); | |||
| helperTask.createArg().setValue( arg ); | |||
| helperTask.setClasspath( compileClasspath ); | |||
| helperTask.addClasspath( compileClasspath ); | |||
| if( helperTask.executeJava() != 0 ) | |||
| { | |||
| getLogger().warn( files[ i ] + " failed to compile" ); | |||
| @@ -37,7 +37,7 @@ public class JasperC | |||
| //FIXME | |||
| Java java = null;//(Java)( getJspc().getProject() ).createTask( "java" ); | |||
| if( getJspc().getClasspath() != null ) | |||
| java.setClasspath( getJspc().getClasspath() ); | |||
| java.addClasspath( getJspc().getClasspath() ); | |||
| java.setClassname( "org.apache.jasper.JspC" ); | |||
| String args[] = cmd.getArguments(); | |||
| for( int i = 0; i < args.length; i++ ) | |||