org.apache.tools.ant.taskdefs

Class Unpack

Known Direct Subclasses:
BUnzip2, GUnzip

public abstract class Unpack
extends Task

Abstract Base class for unpack tasks.
Since:
Ant 1.5

Field Summary

protected File
dest
protected File
source

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

Method Summary

void
execute()
Called by the project to let the task do its work.
protected abstract void
extract()
protected abstract String
getDefaultExtension()
void
setDest(File dest)
The destination file or directory; optional.
void
setDest(String dest)
Deprecated. setDest(String) is deprecated and is replaced with setDest(File) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the type in its own class.
void
setSrc(File src)
The file to expand; required.
void
setSrc(String src)
Deprecated. setSrc(String) is deprecated and is replaced with setSrc(File) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the type in its own class.

Methods inherited from class org.apache.tools.ant.Task

execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

Methods inherited from class org.apache.tools.ant.ProjectComponent

getProject, log, log, setProject

Field Details

dest

protected File dest

source

protected File source

Method Details

execute

public void execute()
            throws BuildException
Called by the project to let the task do its work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.
Overrides:
execute in interface Task
Throws:
BuildException - if something goes wrong with the build

extract

protected abstract void extract()

getDefaultExtension

protected abstract String getDefaultExtension()

setDest

public void setDest(File dest)
The destination file or directory; optional.
Parameters:
dest - destination file or directory

setDest

public void setDest(String dest)

Deprecated. setDest(String) is deprecated and is replaced with setDest(File) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the type in its own class.


setSrc

public void setSrc(File src)
The file to expand; required.
Parameters:
src - file to expand

setSrc

public void setSrc(String src)

Deprecated. setSrc(String) is deprecated and is replaced with setSrc(File) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the type in its own class.


Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.