ClassEnhancerTask (Oracle - Berkeley DB Java Edition API)
Date: 2014-12-16

com.sleepycat.persist.model

## Class ClassEnhancerTask

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.Task
    - - com.sleepycat.persist.model.ClassEnhancerTask

- All Implemented Interfaces:
    Cloneable

      public class ClassEnhancerTask
      extends org.apache.tools.ant.Task

  An `ant` task for running the `ClassEnhancer`.

  `ClassEnhancerTask` objects are thread-safe. Multiple threads may safely call the methods of a shared `ClassEnhancerTask` object.

  Note that in the BDB Java Edition product, the `ClassEnhancerTask` class is included in `je-<version>.jar`. However, in the BDB (C-based) product, it is not included in `db.jar` because the build is not dependent on the Ant libraries. Therefore, in the BDB product, the application must compile the `java/src/com/sleepycat/persist/model/ClassEnhancerTask.java` source file and ensure that the compiled class is available to the Ant task. For example the following Ant task definitions could be used.

  For BDB Java Edition product:

       <taskdef name="enhance-persistent-classes"
                classname="com.sleepycat.persist.model.ClassEnhancerTask"
                classpath="${je.home}/lib/je-<version>.jar"/>

  For BDB (C-based Edition) product:

       <taskdef name="enhance-persistent-classes"
                classname="com.sleepycat.persist.model.ClassEnhancerTask"
                classpath="/path-to-jar/db.jar:/path-to-ClassEnhancerTask-class"/>

  The class enhancer task element has no attributes. It may contain one or more nested `fileset` elements specifying the classes to be enhanced. The class files are replaced when they are enhanced, without changing the file modification date. For example:

       <target name="main">
           <enhance-persistent-classes verbose="no">
               <fileset dir="classes"/>
           </enhance-persistent-classes>
       </target>

  The verbose attribute may be specified as "true", "yes" or "on" (like other Ant boolean attributes) to print the name of each class file that is enhanced. The total number of class files enhanced will always be printed.

  Author:
    Mark Hayes

- - ### 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 and Description
    `ClassEnhancerTask()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConfiguredFileset(org.apache.tools.ant.types.FileSet files)`
    `void` | `execute()`
    `void` | `setVerbose(boolean verbose)`

    - ### 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`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClassEnhancerTask

          public ClassEnhancerTask()

  - ### Method Detail

    - #### execute

          public void execute()
                       throws org.apache.tools.ant.BuildException

      Overrides:
        `execute` in class `org.apache.tools.ant.Task`
      Throws:
        `org.apache.tools.ant.BuildException`

    - #### addConfiguredFileset

          public void addConfiguredFileset(org.apache.tools.ant.types.FileSet files)

    - #### setVerbose

          public void setVerbose(boolean verbose)

Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.