Module: Cheri::AWT::Types

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

Constant Summary collapse

CJava =
Cheri::Java
JA =
'java.awt.'.freeze

Class Method Summary collapse

Class Method Details

.get_class(y) ⇒ Object



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

def get_class(y)
  # TODO: threadsafe support? Probably not necessary if we're not adding keys.
  c = @classes[y]
  if c
    if c.instance_of?(String)
      c = CJava.get_class(JA + c)
      @classes[y] = c if c
    end
    c
  else
    nil
  end
end

.namesObject



45
46
47
# File 'lib/cheri/builder/awt/types.rb', line 45

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