01: /*
02: * Created on Oct 22, 2005
03: */
04: package uk.org.ponder.saxalizer;
05:
06: // TODO: This interface was experimentally extracted - we are probably
07: // going to go with PropertyAccessor instead.
08: public interface AccessMethod {
09: public String getPropertyName();
10:
11: public Object getChildObject(Object parent);
12:
13: public void setChildObject(Object parent, Object newchild);
14:
15: /**
16: * Determines whether this method can be used for getting.
17: *
18: * @return
19: */
20: public boolean canGet();
21:
22: /**
23: * Determines whether this method can be used for setting.
24: *
25: * @return
26: */
27: public boolean canSet();
28:
29: /**
30: * Determines whether the return type of this method is assignable to
31: * Enumeration, which is interpreted as indicating a non-settable multiple
32: * value, in the case that there is no individual set method.
33: */
34: public boolean isEnumeration();
35:
36: /**
37: * Determines whether this set method may be used for the delivery of multiple
38: * subobjects. If it is, the object delivered by Get may be converted into a
39: * receiver by EnumerationConverter.getDenumeration(oldinstance).
40: */
41: public boolean isDenumerable();
42:
43: /**
44: * Returns the accessed type for this method. If it is a collection or other
45: * denumerable type for which we have a mapping or inference, this will be the
46: * contained type of the collection rather than the collection type itself.
47: */
48: public Class getAccessedType();
49:
50: public Class getDeclaredType();
51:
52: /**
53: * @return the declaring class for this method
54: */
55: public Class getDeclaringClass();
56:
57: }
|