01: package org.gui4j.core;
02:
03: import java.util.Set;
04:
05: import org.gui4j.Gui4jCallBase;
06: import org.gui4j.Gui4jGetValue;
07:
08: /**
09: * Represents the interface for all reflection call. Method calls, field accesses,
10: * integer constants, and also string constants are instances of this
11: * interface. Parsing of reflection calls is done by
12:
13: */
14: public interface Gui4jCall extends Gui4jGetValue {
15: /**
16: * Method getDependantProperties. Returns the list of
17: * dependant events.
18: * @return Gui4jCall[]
19: */
20: Gui4jCall[] getDependantProperties();
21:
22: /**
23: * Method hasTriggerEvents. Returns <code>true</code> if the
24: * list of dependant events is non-empty.
25: * @return boolean
26: */
27: boolean hasTriggerEvents();
28:
29: /**
30: * Method getResultClass.
31: * @return Class the return-type of the reflection call
32: */
33: Class getResultClass();
34:
35: /**
36: * Method getValueClass.
37: * @return Class the type of the default parameter (name "")
38: */
39: Class getValueClass();
40:
41: /**
42: * Method getValueClass.
43: * @param paramName
44: * @return the type of the given parameter
45: */
46: Class getValueClass(String paramName);
47:
48: /**
49: * Returns actually used parameter names.
50: * @return a set containing the names of all actually used parameters in this call. The
51: * returned set is empty (not <code>null</code>) if no parameters were used.
52: */
53: Set getUsedParams();
54:
55: /**
56: * Method getValueNoParams. Evaluates the reflection call and uses
57: * no parameter instantiation.
58: * @param baseInstance
59: * @param defaultValue the value if the call fails
60: * @return Object
61: */
62: Object getValueNoParams(Gui4jCallBase baseInstance,
63: Object defaultValue);
64:
65: /**
66: * Method getValueUseDefaultParam. Evaluates the reflection call with given
67: * value for the default parameter (name "").
68: * @param baseInstance
69: * @param defaultParamValue
70: * @param defaultValue the value if the call fails
71: * @return Object
72: */
73: Object getValueUseDefaultParam(Gui4jCallBase baseInstance,
74: Object defaultParamValue, Object defaultValue);
75:
76: /**
77: * Method getConfigurationSource.
78: * @return String. The name of the XML-file where the reflection call was defined. This
79: * is usually used only for error reporting.
80: */
81: String getConfigurationName();
82:
83: }
|