262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
|
# File 'lib/bitescript/mirror.rb', line 262
def inspect
if annotation?
kind = "@interface"
elsif interface?
kind = "interface"
elsif enum?
kind = "enum"
else
kind = "class"
end
if superclass && !enum? && !interface?
extends = "extends #{superclass.getClassName} "
end
if self.interfaces && !self.interfaces.empty?
interfaces = self.interfaces.map{|i| i.class_name}.join(', ')
if interface?
extends = "extends #{interfaces} "
else
implements = "implements #{interfaces} "
end
end
result = "#{inspect_annotations}#{modifier_string}#{kind} "
result << "#{type.class_name} #{extends}{\n"
(getDeclaredFields + getConstructors + getDeclaredMethods).each do |f|
result << f.inspect << "\n"
end
result << "}"
end
|