Class Environment


public final class Environment extends Support
Environment serves as a central collection for the options and working environment of the filter tool.
  • Constructor Details

    • Environment

      public Environment()
      The constructor
  • Method Details

    • setDoTimingStatistics

      public void setDoTimingStatistics(boolean dontOpt)
    • doTimingStatistics

      public boolean doTimingStatistics()
    • error

      public void error(String error)
    • warning

      public void warning(String warn)
    • warning

      public void warning(String warn, String classname)
    • warning

      public void warning(String warn, String classname, String fieldname)
    • message

      public void message(String mess)
    • messageNL

      public void messageNL(String mess)
    • errorCount

      public int errorCount()
    • getLastErrorMessage

      public final String getLastErrorMessage()
    • forceOverwrite

      public boolean forceOverwrite()
    • updateInPlace

      public boolean updateInPlace()
    • destinationDirectory

      public File destinationDirectory()
    • writeClasses

      public boolean writeClasses()
      Expected dump levels are 0, 1, 2, 3 dump level 0 is always on.
    • doThisOptimization

      public boolean doThisOptimization()
    • doInitializerOptimization

      public boolean doInitializerOptimization()
    • getJDOMetaData

      public JDOMetaData getJDOMetaData()
      Is the class a well known persistent capable class? These are normally the java primitives.
    • setJDOMetaData

      public void setJDOMetaData(JDOMetaData jdoMetaData)
    • addClass

      public void addClass(ClassControl cc)
      Add the class to the class mapping table. Check that it does not conflict with earlier settings.
    • canFindClass

      public boolean canFindClass(String className)
      Look for the specified class in the class map. If not there, use the class path to find the class. If still not found, return false.
    • getClass

      public ClassControl getClass(String className)
      Look for the specified class in the class map. No other class lookup is performed. Use this only if you are certain that the class will have been found.
    • getClasses

      public Iterator getClasses()
    • findClass

      public ClassControl findClass(String className)
      Look for the specified class in the class map. If not there, use the class path to find the class. If still not found, return false.
    • lookupClass

      public ClassControl lookupClass(String className)
      Look up the specified class in the class search path. Callers should normally consult the classmap prior to calling this function. The class is not entered into the classmap
    • collectClasses

      public ArrayList collectClasses(int persistType)
      Return a ArrayList of ClassControl objects which have the specified persistence type
    • collectClasses

      public ArrayList collectClasses()
      Return an ArrayList of the ClassControls in classMap. This is useful in that it provides a stable base for enumeration.
    • lookupDestClass

      public ClassFileSource lookupDestClass(String className)
      Look for a class source using the destination directory as a root directory for the lookup which represents the annotated output for the class specified. Return null if not found.
    • setDestinationDirectory

      public void setDestinationDirectory(String dir)
    • excludeDestinationDirectory

      public void excludeDestinationDirectory()
      Update the class path to remove the destination directory if it is found in the class path.
    • moveDestinationDirectoryToEnd

      public void moveDestinationDirectoryToEnd()
      Update the class path to move the destination directory to the end of the class path if it is found in the class path.
    • setOutputWriter

      public void setOutputWriter(PrintWriter out)
    • getOutputWriter

      public PrintWriter getOutputWriter()
    • setErrorWriter

      public void setErrorWriter(PrintWriter err)
    • getErrorWriter

      public PrintWriter getErrorWriter()
    • setVerbose

      public void setVerbose(boolean beVerbose)
    • isVerbose

      public boolean isVerbose()
    • setQuiet

      public void setQuiet(boolean beQuiet)
    • setNoWrite

      public void setNoWrite(boolean dontWrite)
    • setNoThisOptimization

      public void setNoThisOptimization(boolean dontOpt)
    • setNoInitializerOptimization

      public void setNoInitializerOptimization(boolean dontOpt)
    • setNoOptimization

      public void setNoOptimization(boolean dontOpt)
    • setForceOverwrite

      public void setForceOverwrite(boolean forceOverwrite)
    • suppressClassWarnings

      public void suppressClassWarnings(String className)
      Add a suppression entry for a class
    • suppressFieldWarnings

      public void suppressFieldWarnings(String fullFieldName)
      Add a suppression entry for a field of a class
    • reset

      public void reset()
      Reset the environment.