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.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Pattern
private String
private File
for javac-like dest dir behaviourprivate File
private File
the actual output directory (outputDir = destinationDir + package))private static final Pattern
private String
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes the ant task.void
Peek into .flex file to get package and class nameGetter for the fieldclassName
.getPackage.void
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.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.void
setPack
(boolean b) setPack.void
setSkel.void
setSkeleton
(File skeleton) setSkeleton.void
setSkipMinimization
(boolean skipMin) setSkipMinimization.void
setTime
(boolean displayTime) setTime.void
setTimeStatistics
(boolean displayTime) setTimeStatistics.final void
setUnusedWarning
(boolean warn) setUnusedWarning.final 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
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
PACKAGE_PATTERN
-
CLASS_PATTERN
-
inputFile
-
className
-
packageName
-
destinationDir
for javac-like dest dir behaviour -
outputDir
the actual output directory (outputDir = destinationDir + package))
-
-
Constructor Details
-
JFlexTask
public JFlexTask()Constructor for JFlexTask.
-
-
Method Details
-
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
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
getPackage.- Returns:
- package name of input file
- See Also:
-
getClassName
Getter for the fieldclassName
.- Returns:
- class name of input file
- See Also:
-
setDestdir
setDestdir.- Parameters:
destinationDir
- aFile
object.
-
setOutdir
setOutdir.- Parameters:
outDir
- aFile
object.
-
setFile
setFile.- Parameters:
file
- 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 final void setVerbose(boolean verbose) setVerbose.- Parameters:
verbose
- a boolean.
-
setUnusedWarning
public final void setUnusedWarning(boolean warn) setUnusedWarning.- Parameters:
warn
- a boolean.
-
setSkeleton
setSkeleton.- Parameters:
skeleton
- aFile
object.
-
setSkel
setSkel.- 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
Set the input encoding. If unset will use the JVM default.- Parameters:
encodingName
- the name of the encoding to set (e.g. "utf-8").
-