Module: Cheri::AWT::Constants

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

Constant Summary collapse

ConstRec =
Cheri::Java::Builder::Constants::ConstRec

Class Method Summary collapse

Class Method Details

.add(y, t, d) ⇒ Object

:nodoc:



33
34
35
36
37
38
39
40
41
# File 'lib/cheri/builder/awt/constants.rb', line 33

def add(y,t,d) #:nodoc:

  unless (@constants[y])
    @constants[y] = ConstRec.new(t,d)
    return
  end
  r = @constants[y]
  r = r.next_rec while r.next_rec
  r.next_rec = ConstRec.new(t,d)
end

.get(y) ⇒ Object Also known as: get_const_recs

call-seq:

Constants.get(symbol)             -> ConstRec or nil
Constants.get_const_recs(symbol)  -> ConstRec or nil


47
48
49
# File 'lib/cheri/builder/awt/constants.rb', line 47

def get(y)
  @constants[y]
end