cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers AntResolver.java LocationResolver.java URLResolver.java

2004-12-10 Thread peterreilly
peterreilly2004/12/10 02:58:19

  Modified:
src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers
AntResolver.java LocationResolver.java
URLResolver.java
  Log:
  checkstyle changes
  Obtained from: Kevin Jackson
  
  Revision  ChangesPath
  1.11  +46 -22
ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java
  
  Index: AntResolver.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AntResolver.java  9 Mar 2004 16:48:26 -   1.10
  +++ AntResolver.java  10 Dec 2004 10:58:19 -  1.11
  @@ -29,63 +29,87 @@
*
* @version $Revision$ $Date$
*/
  -public class AntResolver
  -implements ExtensionResolver {
  -private File m_antfile;
  -private File m_destfile;
  -private String m_target;
  -
  -public void setAntfile(File antfile) {
  -m_antfile = antfile;
  +public class AntResolver implements ExtensionResolver {
  +private File antfile;
  +private File destfile;
  +private String target;
  +
  +/**
  + * Sets the ant file
  + * @param antfile the ant file to set
  + */
  +public void setAntfile(final File antfile) {
  +this.antfile = antfile;
   }
   
  -public void setDestfile(File destfile) {
  -m_destfile = destfile;
  +/**
  + * Sets the destination file
  + * @param destfile the destination file
  + */
  +public void setDestfile(final File destfile) {
  +this.destfile = destfile;
   }
   
  +/**
  + * Sets the target
  + * @param target the target
  + */
   public void setTarget(final String target) {
  -m_target = target;
  +this.target = target;
   }
   
  +/**
  + * Returns the resolved file
  + * @param extension the extension
  + * @param project the project
  + * @return the file resolved
  + * @throws BuildException if the file cannot be resolved
  + */
   public File resolve(final Extension extension,
  - final Project project)
  -throws BuildException {
  + final Project project) throws BuildException {
   validate();
   
   final Ant ant = (Ant) project.createTask(ant);
   ant.setInheritAll(false);
  -ant.setAntfile(m_antfile.getName());
  +ant.setAntfile(antfile.getName());
   
   try {
   final File dir =
  -m_antfile.getParentFile().getCanonicalFile();
  +antfile.getParentFile().getCanonicalFile();
   ant.setDir(dir);
   } catch (final IOException ioe) {
   throw new BuildException(ioe.getMessage(), ioe);
   }
   
  -if (null != m_target) {
  -ant.setTarget(m_target);
  +if (null != target) {
  +ant.setTarget(target);
   }
   
   ant.execute();
   
  -return m_destfile;
  +return destfile;
   }
   
  +/*
  + * Validates URL
  + */
   private void validate() {
  -if (null == m_antfile) {
  +if (null == antfile) {
   final String message = Must specify Buildfile;
   throw new BuildException(message);
   }
   
  -if (null == m_destfile) {
  +if (null == destfile) {
   final String message = Must specify destination file;
   throw new BuildException(message);
   }
   }
   
  +/**
  + * Returns a string representation
  + * @return the string representation
  + */
   public String toString() {
  -return Ant[ + m_antfile + == + m_destfile + ];
  +return Ant[ + antfile + == + destfile + ];
   }
   }
  
  
  
  1.11  +23 -11
ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/LocationResolver.java
  
  Index: LocationResolver.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/LocationResolver.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LocationResolver.java 9 Mar 2004 16:48:27 -   1.10
  +++ LocationResolver.java 10 Dec 2004 10:58:19 -  1.11
  @@ -27,26 +27,38 @@
*
* @version $Revision$ $Date$
*/
  -public class LocationResolver
  -implements ExtensionResolver {
  -private String m_location;
  +public class LocationResolver implements ExtensionResolver {
  +private String location;
   
  +/**
  + * Sets the location for this resolver
  + * @param location the location
  + */
   public void 

cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers AntResolver.java LocationResolver.java URLResolver.java

2004-12-10 Thread peterreilly
peterreilly2004/12/10 02:58:36

  Modified:
src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers
Tag: ANT_16_BRANCH AntResolver.java
LocationResolver.java URLResolver.java
  Log:
  sync
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.6.2.5   +47 -23
ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java
  
  Index: AntResolver.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java,v
  retrieving revision 1.6.2.4
  retrieving revision 1.6.2.5
  diff -u -r1.6.2.4 -r1.6.2.5
  --- AntResolver.java  9 Mar 2004 17:01:46 -   1.6.2.4
  +++ AntResolver.java  10 Dec 2004 10:58:36 -  1.6.2.5
  @@ -29,63 +29,87 @@
*
* @version $Revision$ $Date$
*/
  -public class AntResolver
  -implements ExtensionResolver {
  -private File m_antfile;
  -private File m_destfile;
  -private String m_target;
  -
  -public void setAntfile(File antfile) {
  -m_antfile = antfile;
  +public class AntResolver implements ExtensionResolver {
  +private File antfile;
  +private File destfile;
  +private String target;
  +
  +/**
  + * Sets the ant file
  + * @param antfile the ant file to set
  + */
  +public void setAntfile(final File antfile) {
  +this.antfile = antfile;
   }
   
  -public void setDestfile(File destfile) {
  -m_destfile = destfile;
  +/**
  + * Sets the destination file
  + * @param destfile the destination file
  + */
  +public void setDestfile(final File destfile) {
  +this.destfile = destfile;
   }
   
  +/**
  + * Sets the target
  + * @param target the target
  + */
   public void setTarget(final String target) {
  -m_target = target;
  +this.target = target;
   }
   
  +/**
  + * Returns the resolved file
  + * @param extension the extension
  + * @param project the project
  + * @return the file resolved
  + * @throws BuildException if the file cannot be resolved
  + */
   public File resolve(final Extension extension,
  - final Project project)
  -throws BuildException {
  + final Project project) throws BuildException {
   validate();
   
   final Ant ant = (Ant) project.createTask(ant);
   ant.setInheritAll(false);
  -ant.setAntfile(m_antfile.getName());
  +ant.setAntfile(antfile.getName());
   
   try {
   final File dir =
  -m_antfile.getParentFile().getCanonicalFile();
  +antfile.getParentFile().getCanonicalFile();
   ant.setDir(dir);
   } catch (final IOException ioe) {
   throw new BuildException(ioe.getMessage(), ioe);
   }
   
  -if (null != m_target) {
  -ant.setTarget(m_target);
  +if (null != target) {
  +ant.setTarget(target);
   }
   
   ant.execute();
   
  -return m_destfile;
  +return destfile;
   }
  -
  +
  +/*
  + * Validates URL
  + */
   private void validate() {
  -if (null == m_antfile) {
  +if (null == antfile) {
   final String message = Must specify Buildfile;
   throw new BuildException(message);
   }
   
  -if (null == m_destfile) {
  +if (null == destfile) {
   final String message = Must specify destination file;
   throw new BuildException(message);
   }
   }
   
  +/**
  + * Returns a string representation
  + * @return the string representation
  + */
   public String toString() {
  -return Ant[ + m_antfile + == + m_destfile + ];
  +return Ant[ + antfile + == + destfile + ];
   }
   }
  
  
  
  1.6.2.5   +23 -11
ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/LocationResolver.java
  
  Index: LocationResolver.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/LocationResolver.java,v
  retrieving revision 1.6.2.4
  retrieving revision 1.6.2.5
  diff -u -r1.6.2.4 -r1.6.2.5
  --- LocationResolver.java 9 Mar 2004 17:01:46 -   1.6.2.4
  +++ LocationResolver.java 10 Dec 2004 10:58:36 -  1.6.2.5
  @@ -27,26 +27,38 @@
*
* @version $Revision$ $Date$
*/
  -public class LocationResolver
  -implements ExtensionResolver {
  -private String m_location;
  +public class LocationResolver implements ExtensionResolver {
  +private String location;
   
  +/**
  + * Sets the location for