Package jflex.anttask
Class JFlexTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- jflex.anttask.JFlexTask
-
- All Implemented Interfaces:
Cloneable
public class JFlexTask extends org.apache.tools.ant.TaskJFlex ant task.- Version:
- JFlex 1.8.2
- Author:
- Rafal Mantiuk
-
-
Constructor Summary
Constructors Constructor Description JFlexTask()Constructor for JFlexTask.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Executes the ant task.voidfindPackageAndClass()Peek into .flex file to get package and class nameStringgetClassName()Getter for the fieldclassName.StringgetPackage()getPackage.voidnormalizeOutdir()Sets the actual output directory if not already set.voidsetDestdir(File destinationDir)setDestdir.voidsetDot(boolean b)setDot.voidsetDump(boolean b)setDump.voidsetEncoding(String encodingName)Set the input encoding.voidsetFile(File file)setFile.voidsetGenerateDot(boolean genDot)setGenerateDot.voidsetJLex(boolean b)setJLex.voidsetLegacyDot(boolean b)setLegacyDot.voidsetNobak(boolean b)setNobak.voidsetNomin(boolean b)setNomin.voidsetOutdir(File outDir)setOutdir.voidsetPack(boolean b)setPack.voidsetSkel(File skeleton)setSkel.voidsetSkeleton(File skeleton)setSkeleton.voidsetSkipMinimization(boolean skipMin)setSkipMinimization.voidsetTime(boolean displayTime)setTime.voidsetTimeStatistics(boolean displayTime)setTimeStatistics.voidsetUnusedWarning(boolean warn)setUnusedWarning.voidsetVerbose(boolean verbose)setVerbose.-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Method Detail
-
execute
public void execute()
Executes the ant task.- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException- if any.
-
findPackageAndClass
public void findPackageAndClass() throws IOExceptionPeek into .flex file to get package and class name- Throws:
IOException- if there is a problem reading the .flex file
-
normalizeOutdir
public void normalizeOutdir()
Sets the actual output directory if not already set.Uses javac logic to determine output dir = dest dir + package name If not destdir has been set, output dir = parent of input file
Assumes that package name is already set.
-
getPackage
public String getPackage()
getPackage.- Returns:
- package name of input file
- See Also:
findPackageAndClass()
-
getClassName
public String getClassName()
Getter for the fieldclassName.- Returns:
- class name of input file
- See Also:
findPackageAndClass()
-
setDestdir
public void setDestdir(File destinationDir)
setDestdir.- Parameters:
destinationDir- aFileobject.
-
setGenerateDot
public void setGenerateDot(boolean genDot)
setGenerateDot.- Parameters:
genDot- a boolean.
-
setTimeStatistics
public void setTimeStatistics(boolean displayTime)
setTimeStatistics.- Parameters:
displayTime- a boolean.
-
setTime
public void setTime(boolean displayTime)
setTime.- Parameters:
displayTime- a boolean.
-
setVerbose
public final void setVerbose(boolean verbose)
setVerbose.- Parameters:
verbose- a boolean.
-
setUnusedWarning
public final void setUnusedWarning(boolean warn)
setUnusedWarning.- Parameters:
warn- a boolean.
-
setSkeleton
public void setSkeleton(File skeleton)
setSkeleton.- Parameters:
skeleton- aFileobject.
-
setSkipMinimization
public void setSkipMinimization(boolean skipMin)
setSkipMinimization.- Parameters:
skipMin- a boolean.
-
setNomin
public void setNomin(boolean b)
setNomin.- Parameters:
b- a boolean.
-
setNobak
public void setNobak(boolean b)
setNobak.- Parameters:
b- a boolean.
-
setPack
public void setPack(boolean b)
setPack.- Parameters:
b- a boolean.
-
setDot
public void setDot(boolean b)
setDot.- Parameters:
b- a boolean.
-
setDump
public void setDump(boolean b)
setDump.- Parameters:
b- a boolean.
-
setJLex
public void setJLex(boolean b)
setJLex.- Parameters:
b- a boolean.
-
setLegacyDot
public void setLegacyDot(boolean b)
setLegacyDot.- Parameters:
b- a boolean.
-
setEncoding
public void setEncoding(String encodingName)
Set the input encoding. If unset will use the JVM default.- Parameters:
encodingName- the name of the encoding to set (e.g. "utf-8").
-
-