01: package org.hibernate.bytecode.util;
02:
03: /**
04: * Used to determine whether a field reference should be instrumented.
05: *
06: * @author Steve Ebersole
07: */
08: public interface FieldFilter {
09: /**
10: * Should this field definition be instrumented?
11: *
12: * @param className The name of the class currently being processed
13: * @param fieldName The name of the field being checked.
14: * @return True if we should instrument this field.
15: */
16: public boolean shouldInstrumentField(String className,
17: String fieldName);
18:
19: /**
20: * Should we instrument *access to* the given field. This differs from
21: * {@link #shouldInstrumentField} in that here we are talking about a particular usage of
22: * a field.
23: *
24: * @param transformingClassName The class currently being transformed.
25: * @param fieldOwnerClassName The name of the class owning this field being checked.
26: * @param fieldName The name of the field being checked.
27: * @return True if this access should be transformed.
28: */
29: public boolean shouldTransformFieldAccess(
30: String transformingClassName, String fieldOwnerClassName,
31: String fieldName);
32: }
|