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