/[eiffelstudio]/trunk/Src/library/Eiffel2Java/java_entity.e
ViewVC logotype

Contents of /trunk/Src/library/Eiffel2Java/java_entity.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 56675 - (show annotations)
Mon Jan 23 02:25:44 2006 UTC (14 years, 1 month ago) by manus
File size: 7545 byte(s)
Added Eiffel Forum License Version 2 and missing copyright statments.

1 indexing
2 description: "Description of a java entity (either a class or an instance of a class."
3 legal: "See notice at end of class."
4 status: "See notice at end of class."
5 date: "$Date$"
6 revision: "$Revision$"
7
8 deferred class
9 JAVA_ENTITY
10
11 feature -- Reflection
12
13 method_id (feature_name: STRING; signature: STRING): POINTER is
14 -- Find method_id for `feature_name' with signature
15 -- encoded by `signature'
16 require
17 feature_name_not_void: feature_name /= Void
18 feature_name_not_empty: not feature_name.is_empty
19 signature_not_void: signature /= Void
20 signature_not_empty: not signature.is_empty
21 deferred
22 ensure
23 method_exists: Result /= default_pointer
24 end
25
26 field_id (attribute_name: STRING; signature: STRING): POINTER is
27 -- Find field_id used for `attribute_name' with signature
28 -- encoded by `signature'.
29 require
30 attribute_name_not_void: attribute_name /= Void
31 attribute_name_not_empty: not attribute_name.is_empty
32 signature_not_void: signature /= Void
33 signature_not_empty: not signature.is_empty
34 deferred
35 end
36
37 feature -- call object's methods
38
39 void_method (mid: POINTER; args: JAVA_ARGS) is
40 -- Call a Java procedure with method_id "mid" and
41 -- arguments "args.
42 require
43 mid_not_null: mid /= default_pointer
44 deferred
45 end
46
47 string_method (mid: POINTER; args: JAVA_ARGS): STRING is
48 -- Call an instance function that returns a STRING.
49 require
50 mid_not_null: mid /= default_pointer
51 deferred
52 end
53
54 integer_method (mid: POINTER; args: JAVA_ARGS): INTEGER is
55 -- Call an instance function that returns an INTEGER.
56 require
57 mid_not_null: mid /= default_pointer
58 deferred
59 end
60
61 short_method (mid: POINTER; args: JAVA_ARGS): INTEGER_16 is
62 -- Call an instance function that returns a Short (in
63 -- Eiffel we still return an INTEGER).
64 require
65 mid_not_null: mid /= default_pointer
66 deferred
67 end
68
69 long_method (mid: POINTER; args: JAVA_ARGS): INTEGER_64 is
70 -- Call an instance function that returns an Long. This
71 -- function is not implemented.
72 require
73 mid_not_null: mid /= default_pointer
74 deferred
75 end
76
77 double_method (mid: POINTER; args: JAVA_ARGS): DOUBLE is
78 -- Call an instance function that returns a DOUBLE.
79 require
80 mid_not_null: mid /= default_pointer
81 deferred
82 end
83
84 float_method (mid: POINTER; args: JAVA_ARGS): REAL is
85 -- Call an instance function that returns a REAL.
86 require
87 mid_not_null: mid /= default_pointer
88 deferred
89 end
90
91 char_method (mid: POINTER; args: JAVA_ARGS): CHARACTER is
92 -- Call an instance function that returns a char
93 require
94 mid_not_null: mid /= default_pointer
95 deferred
96 end
97
98 boolean_method (mid: POINTER; args: JAVA_ARGS): BOOLEAN is
99 -- Call an instance function that returns a boolean
100 require
101 mid_not_null: mid /= default_pointer
102 deferred
103 end
104
105 object_method (mid: POINTER; args: JAVA_ARGS): JAVA_OBJECT is
106 -- Call an instance function that returns a java object
107 require
108 mid_not_null: mid /= default_pointer
109 deferred
110 end
111
112 byte_method (mid: POINTER; args: JAVA_ARGS): INTEGER_8 is
113 -- Call an instance function that return a byte
114 -- ( 8-bit integer (signed)), in Eiffel return
115 -- a INTEGER_8
116 require
117 mid_not_null: mid /= default_pointer
118 deferred
119 end
120
121 feature -- Access object's attributes
122
123 integer_attribute (fid: POINTER): INTEGER is
124 -- Access to an integer attribute
125 require
126 fid_not_null: fid /= default_pointer
127 deferred
128 end
129
130 string_attribute (fid: POINTER): STRING is
131 -- Access to a String attribute
132 require
133 fid_not_null: fid /= default_pointer
134 deferred
135 end
136
137 object_attribute (fid: POINTER): JAVA_OBJECT is
138 -- Access to a java object attribute
139 require
140 fid_not_null: fid /= default_pointer
141 deferred
142 end
143
144 boolean_attribute (fid: POINTER): BOOLEAN is
145 -- Access to a boolean attribute
146 require
147 fid_not_null: fid /= default_pointer
148 deferred
149 end
150
151 char_attribute (fid: POINTER): CHARACTER is
152 -- Access to a 'char' attribute
153 require
154 fid_not_null: fid /= default_pointer
155 deferred
156 end
157
158 float_attribute (fid: POINTER): REAL is
159 -- Access to a 'float' attribute
160 require
161 fid_not_null: fid /= default_pointer
162 deferred
163 end
164
165 double_attribute (fid: POINTER): DOUBLE is
166 -- Access to a double attribute
167 require
168 fid_not_null: fid /= default_pointer
169 deferred
170 end
171
172 byte_attribute (fid: POINTER): INTEGER_8 is
173 -- Access to a 'byte' attribute
174 require
175 fid_not_null: fid /= default_pointer
176 deferred
177 end
178
179 short_attribute (fid: POINTER): INTEGER_16 is
180 -- Access to a 'short' attribute
181 require
182 fid_not_null: fid /= default_pointer
183 deferred
184 end
185
186 long_attribute (fid: POINTER): INTEGER_64 is
187 -- Access to a 'long' attribute
188 require
189 fid_not_null: fid /= default_pointer
190 deferred
191 end
192
193 feature -- Setting object's attribute
194
195 set_integer_attribute (fid: POINTER; value: INTEGER) is
196 -- Set an 'integer' attribute to 'value'
197 require
198 fid_not_null: fid /= default_pointer
199 deferred
200 ensure
201 integer_attribute_set: integer_attribute (fid) = value
202 end
203
204 set_string_attribute (fid: POINTER; value: STRING) is
205 -- Set a 'String' attribute to 'value'
206 require
207 fid_not_null: fid /= default_pointer
208 deferred
209 ensure
210 string_attribute_set: equal (string_attribute (fid), value)
211 end
212
213 set_object_attribute (fid: POINTER; value: JAVA_OBJECT) is
214 -- Set a java object attribute to 'value'
215 require
216 fid_not_null: fid /= default_pointer
217 deferred
218 ensure
219 object_attribute_set: object_attribute (fid) = value
220 end
221
222 set_boolean_attribute (fid: POINTER; value: BOOLEAN) is
223 -- Set a 'boolean' attribute to 'value'
224 require
225 fid_not_null: fid /= default_pointer
226 deferred
227 ensure
228 boolean_attribute_set: boolean_attribute (fid) = value
229 end
230
231 set_char_attribute (fid: POINTER; value: CHARACTER) is
232 -- Set a 'char' attribute to 'value'
233 require
234 fid_not_null: fid /= default_pointer
235 deferred
236 ensure
237 char_attribute_set: char_attribute (fid) = value
238 end
239
240 set_float_attribute (fid: POINTER; value: REAL) is
241 -- Set a 'float' attribute to 'value'
242 require
243 fid_not_null: fid /= default_pointer
244 deferred
245 ensure
246 float_attribute_set: float_attribute (fid) = value
247 end
248
249 set_double_attribute (fid: POINTER; value: DOUBLE) is
250 -- Set a 'double' attribute to 'value'
251 require
252 fid_not_null: fid /= default_pointer
253 deferred
254 ensure
255 double_attribute_set: double_attribute (fid) = value
256 end
257
258 set_byte_attribute (fid: POINTER; value: INTEGER_8) is
259 -- Set a 'byte' attribute to 'value'
260 require
261 fid_not_null: fid /= default_pointer
262 deferred
263 ensure
264 byte_attribute_set: byte_attribute (fid) = value
265 end
266
267 set_short_attribute (fid: POINTER; value: INTEGER_16) is
268 -- Set a 'short' attribute to 'value'
269 require
270 fid_not_null: fid /= default_pointer
271 deferred
272 ensure
273 short_attribute_set: short_attribute (fid) = value
274 end
275
276 set_long_attribute (fid: POINTER; value: INTEGER_64) is
277 -- Set a 'short' attribute to 'value'
278 require
279 fid_not_null: fid /= default_pointer
280 deferred
281 ensure
282 long_attribute_set: long_attribute (fid) = value
283 end
284
285 indexing
286 copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
287 license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
288 source: "[
289 Eiffel Software
290 356 Storke Road, Goleta, CA 93117 USA
291 Telephone 805-685-1006, Fax 805-685-6869
292 Website http://www.eiffel.com
293 Customer support http://support.eiffel.com
294 ]"
295
296
297
298
299 end -- class JAVA_ENTITY
300

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23