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.Task
JFlex ant task.- Version:
- JFlex 1.8.1
- 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 void
execute()
Executes the ant task.void
findPackageAndClass()
Peek into .flex file to get package and class nameString
getClassName()
Getter for the fieldclassName
.String
getPackage()
getPackage.void
normalizeOutdir()
Sets the actual output directory if not already set.void
setDestdir(File destinationDir)
setDestdir.void
setDot(boolean b)
setDot.void
setDump(boolean b)
setDump.void
setEncoding(String encodingName)
Set the input encoding.void
setFile(File file)
setFile.void
setGenerateDot(boolean genDot)
setGenerateDot.void
setJLex(boolean b)
setJLex.void
setLegacyDot(boolean b)
setLegacyDot.void
setNobak(boolean b)
setNobak.void
setNomin(boolean b)
setNomin.void
setOutdir(File outDir)
setOutdir.void
setPack(boolean b)
setPack.void
setSkel(File skeleton)
setSkel.void
setSkeleton(File skeleton)
setSkeleton.void
setSkipMinimization(boolean skipMin)
setSkipMinimization.void
setTime(boolean displayTime)
setTime.void
setTimeStatistics(boolean displayTime)
setTimeStatistics.void
setUnusedWarning(boolean warn)
setUnusedWarning.void
setVerbose(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:
execute
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
- if any.
-
findPackageAndClass
public void findPackageAndClass() throws IOException
Peek 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
- aFile
object.
-
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 void setVerbose(boolean verbose)
setVerbose.- Parameters:
verbose
- a boolean.
-
setUnusedWarning
public void setUnusedWarning(boolean warn)
setUnusedWarning.- Parameters:
warn
- a boolean.
-
setSkeleton
public void setSkeleton(File skeleton)
setSkeleton.- Parameters:
skeleton
- aFile
object.
-
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").
-
-