Class: Cheri::Java::Builder::ClassBuilder

Inherits:
BaseBuilder show all
Defined in:
lib/cheri/java/builder/main.rb

Overview

BaseBuilder

Direct Known Subclasses

AWT::AWTClassBuilder, GenericClassBuilder

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseBuilder

#mod, #props, #resolve?, #run

Methods inherited from Builder::BaseBuilder

#child?, #parent?, #run

Methods included from Builder::Builder

#args, #child?, #parent?, #run, #sym

Methods included from Builder::Frame

#any?, #block, #child?, #ctx, #inspect, #mod, #object, #parent?, #run

Constructor Details

#initialize(ctx, sym, clazz, *args, &block) ⇒ ClassBuilder

Returns a new instance of ClassBuilder.



103
104
105
106
107
108
109
110
111
# File 'lib/cheri/java/builder/main.rb', line 103

def initialize(ctx,sym,clazz,*args,&block)
  super(ctx,sym,*args,&block)
  @clazz = clazz
  # TODO: I don't know if we want this as default...
  # *ANSWER* yes, because a :SYMBOL will never be a valid Java arg,
  # and doing it this way simplifies adding later Java types and constants.
  # The first simple_resolve check is cheap, so this won't hurt performance
  @resolve = true
end

Class Method Details

.java_classObject



115
116
117
# File 'lib/cheri/java/builder/main.rb', line 115

def @obj.java_class
  self.class.java_class
end