Module: Cheri::Swing::Types

Defined in:
lib/cheri/builder/swing/types.rb

Constant Summary collapse

CJava =

:nodoc:

Cheri::Java
JS =

:nodoc:

'javax.swing.'.freeze

Class Method Summary collapse

Class Method Details

.get_class(sym) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/cheri/builder/swing/types.rb', line 31

def get_class(sym)
  # TODO: threadsafe support?
  cls = @classes[sym]
  if cls
    if cls.instance_of?(String)
      cls = CJava.get_class(JS + cls)
      @classes[sym] = cls if cls
    end
    cls
  else
    nil
  end
end

.namesObject



44
45
46
# File 'lib/cheri/builder/swing/types.rb', line 44

def names
  @names ||= @classes.keys
end