org.apache.tools.ant.taskdefs
Class PathConvert

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.PathConvert

public class PathConvert
extends Task

This task converts path and classpath information to a specific target OS format. The resulting formatted path is placed into a specified property.

LIMITATION: Currently this implementation groups all machines into one of two types: Unix or Windows. Unix is defined as NOT windows.

Author:
Larry Streepy streepy@healthlanguage.com

Inner Class Summary
 class PathConvert.MapEntry
          Helper class, holds the nested values.
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
PathConvert()
           
 
Method Summary
 PathConvert.MapEntry createMap()
          Create a nested MAP element
 Path createPath()
          Create a nested PATH element
 void execute()
          Do the execution.
 boolean isReference()
          Has the refid attribute of this element been set?
 void setDirSep(java.lang.String sep)
          Override the default directory separator string for the target os
 void setPathSep(java.lang.String sep)
          Override the default path separator string for the target os
 void setProperty(java.lang.String p)
          Set the value of the proprty attribute - this is the property into which our converted path will be placed.
 void setRefid(Reference r)
          Adds a reference to a PATH or FILESET defined elsewhere.
 void setTargetos(java.lang.String target)
          Set the value of the targetos attribute
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathConvert

public PathConvert()
Method Detail

createPath

public Path createPath()
Create a nested PATH element

createMap

public PathConvert.MapEntry createMap()
Create a nested MAP element

setTargetos

public void setTargetos(java.lang.String target)
Set the value of the targetos attribute

setProperty

public void setProperty(java.lang.String p)
Set the value of the proprty attribute - this is the property into which our converted path will be placed.

setRefid

public void setRefid(Reference r)
Adds a reference to a PATH or FILESET defined elsewhere.

setPathSep

public void setPathSep(java.lang.String sep)
Override the default path separator string for the target os

setDirSep

public void setDirSep(java.lang.String sep)
Override the default directory separator string for the target os

isReference

public boolean isReference()
Has the refid attribute of this element been set?

execute

public void execute()
             throws BuildException
Do the execution.
Overrides:
execute in class Task
Following copied from class: org.apache.tools.ant.Task
Throws:
BuildException - if someting goes wrong with the build


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.