Class Ruva::VM::Class::Field
In: lib/ruva/class.rb
Parent: Object

Methods

Included Modules

AccessHelpers

Constants

ACC_PUBLIC = 0x0001
ACC_PRIVATE = 0x0002
ACC_PROTECTED = 0x0004
ACC_STATIC = 0x0008
ACC_FINAL = 0x0010
ACC_VOLATILE = 0x0040
ACC_TRANSIENT = 0x0080
ACC_SYNTHETIC = 0x1000
ACC_ENUM = 0x4000

Attributes

access  [RW] 
annotations  [RW] 
attrs  [RW] 
desc  [RW] 
name  [RW] 
signature  [RW] 
value  [RW] 

Public Class methods

[Source]

     # File lib/ruva/class.rb, line 260
260:         def initialize(access, name, desc, signature, value)
261:           self.access, self.name, self.desc, self.signature, self.value =
262:             access, name, desc, signature, value
263:             
264:           self.annotations, self.attrs = [], []
265:         end

Public Instance methods

[Source]

     # File lib/ruva/class.rb, line 267
267:         def primitive?
268:           desc.length == 1
269:         end

[Source]

     # File lib/ruva/class.rb, line 285
285:         def to_s
286:           "#{Class.human_access_field(self)}#{Class.human_desc(desc)} #{name}"
287:         end

Visit an annotation. Should return an Annotation visitor to suit.

[Source]

     # File lib/ruva/class.rb, line 272
272:         def visit_annotation(desc, visible)
273:           annotations << a = Annotation.new(desc, visible)
274:           a
275:         end

Visit a non=standard attribute

[Source]

     # File lib/ruva/class.rb, line 278
278:         def visit_attribute(attr)
279:           attrs < attr
280:         end

[Source]

     # File lib/ruva/class.rb, line 282
282:         def visit_end    
283:         end

[Validate]