org.hibernate.tool.instrument

Class BasicInstrumentationTask.CustomFieldFilter

Enclosing Class:
BasicInstrumentationTask
Implemented Interfaces:
FieldFilter

protected class BasicInstrumentationTask.CustomFieldFilter
extends java.lang.Object
implements FieldFilter

Constructor Summary

CustomFieldFilter(ClassDescriptor descriptor)

Method Summary

boolean
shouldInstrumentField(String className, String fieldName)
Should this field definition be instrumented?
boolean
shouldTransformFieldAccess(String transformingClassName, String fieldOwnerClassName, String fieldName)
Should we instrument *access to* the given field.

Constructor Details

CustomFieldFilter

public CustomFieldFilter(ClassDescriptor descriptor)

Method Details

shouldInstrumentField

public boolean shouldInstrumentField(String className,
                                     String fieldName)
Should this field definition be instrumented?
Specified by:
shouldInstrumentField in interface FieldFilter
Parameters:
className - The name of the class currently being processed
fieldName - The name of the field being checked.
Returns:
True if we should instrument this field.

shouldTransformFieldAccess

public boolean shouldTransformFieldAccess(String transformingClassName,
                                          String fieldOwnerClassName,
                                          String fieldName)
Specified by:
shouldTransformFieldAccess in interface FieldFilter
Parameters:
transformingClassName - The class currently being transformed.
fieldOwnerClassName - The name of the class owning this field being checked.
fieldName - The name of the field being checked.
Returns:
True if this access should be transformed.