01: package org.hibernate.bytecode.javassist;
02:
03: /**
04: * The interface defining how interception of a field should be handled.
05: *
06: * @author Muga Nishizawa
07: */
08: public interface FieldHandler {
09:
10: /**
11: * Called to handle writing an int value to a given field.
12: *
13: * @param obj ?
14: * @param name The name of the field being written
15: * @param oldValue The old field value
16: * @param newValue The new field value.
17: * @return ?
18: */
19: int writeInt(Object obj, String name, int oldValue, int newValue);
20:
21: char writeChar(Object obj, String name, char oldValue, char newValue);
22:
23: byte writeByte(Object obj, String name, byte oldValue, byte newValue);
24:
25: boolean writeBoolean(Object obj, String name, boolean oldValue,
26: boolean newValue);
27:
28: short writeShort(Object obj, String name, short oldValue,
29: short newValue);
30:
31: float writeFloat(Object obj, String name, float oldValue,
32: float newValue);
33:
34: double writeDouble(Object obj, String name, double oldValue,
35: double newValue);
36:
37: long writeLong(Object obj, String name, long oldValue, long newValue);
38:
39: Object writeObject(Object obj, String name, Object oldValue,
40: Object newValue);
41:
42: int readInt(Object obj, String name, int oldValue);
43:
44: char readChar(Object obj, String name, char oldValue);
45:
46: byte readByte(Object obj, String name, byte oldValue);
47:
48: boolean readBoolean(Object obj, String name, boolean oldValue);
49:
50: short readShort(Object obj, String name, short oldValue);
51:
52: float readFloat(Object obj, String name, float oldValue);
53:
54: double readDouble(Object obj, String name, double oldValue);
55:
56: long readLong(Object obj, String name, long oldValue);
57:
58: Object readObject(Object obj, String name, Object oldValue);
59:
60: }
|