Top Description Constructors Methods
org.hibernate.tool.instrument.cglib

public Class InstrumentTask

extends BasicInstrumentationTask
Class Inheritance
Annotations
@Deprecated
Imports
org.hibernate.bytecode.buildtime.CGLIBInstrumenter, .Instrumenter, .Logger, org.hibernate.tool.instrument.BasicInstrumentationTask

Deprecated

Per HHH-5451 support for cglib as a bytecode provider has been deprecated; use org.hibernate.tool.instrument.javassist.InstrumentTask instead

An Ant task for instrumenting persistent classes in order to enable field-level interception using CGLIB.

In order to use this task, typically you would define a a taskdef similar to:

<taskdef name="instrument" classname="org.hibernate.tool.instrument.cglib.InstrumentTask">
    <classpath refid="lib.class.path"/>
</taskdef>
where lib.class.path is an ANT path reference containing all the required Hibernate and CGLIB libraries.

And then use it like:

<instrument>
    <fileset dir="${testclasses.dir}/org/hibernate/test">
        <include name="yadda/yadda/**"/>
        ...
    </fileset>
</instrument>
where the nested ANT fileset includes the class you would like to have instrumented.

Optionally you can chose to enable "Extended Instrumentation" if desired by specifying the extended attribute on the task:

<instrument extended="true">
    ...
</instrument>
See the Hibernate manual regarding this option.
Authors
Gavin King, Steve Ebersole

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Instrumenter
Inherited from org.hibernate.tool.instrument.BasicInstrumentationTask:
addFilesetexecutefilesetsisExtendedisVerboseperformExtendedInstrumentationsetExtendedsetVerbose

Constructor Detail

InstrumentTaskback to summary
public InstrumentTask()

Method Detail

buildInstrumenterback to summary
protected Instrumenter buildInstrumenter(Logger logger, Instrumenter.Options options)

Implements abstract org.hibernate.tool.instrument.BasicInstrumentationTask.buildInstrumenter.