Package jflex.anttask

Class 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
    • Field Summary

      • 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 
      Constructor Description
      JFlexTask()
      Constructor for JFlexTask.
    • Constructor Detail

      • JFlexTask

        public JFlexTask()
        Constructor for JFlexTask.
    • Method Detail

      • execute

        public void execute()
        Executes the ant task.
        Overrides:
        execute in class org.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.

      • getClassName

        public String getClassName()
        Getter for the field className.
        Returns:
        class name of input file
        See Also:
        findPackageAndClass()
      • setDestdir

        public void setDestdir​(File destinationDir)
        setDestdir.
        Parameters:
        destinationDir - a File object.
      • setOutdir

        public void setOutdir​(File outDir)
        setOutdir.
        Parameters:
        outDir - a File object.
      • setFile

        public void setFile​(File file)
        setFile.
        Parameters:
        file - a File 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 - a File object.
      • setSkel

        public void setSkel​(File skeleton)
        setSkel.
        Parameters:
        skeleton - a File 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").