Class: LanguageParser::JavaVariable

Inherits:
ClassVariable show all
Defined in:
lib/cgialib/lp/JavaLanguageScanner.rb

Overview

class : JavaVariable

A specialized ClassVariable that includes the JavaDoc for the class

Instance Attribute Summary collapse

Attributes inherited from ClassVariable

#comment, #const, #name, #static, #type, #value, #visibility

Instance Method Summary collapse

Methods inherited from ClassVariable

#to_s

Constructor Details

#initializeJavaVariable

initialize()

Constructor



21
22
23
24
25
26
27
28
# File 'lib/cgialib/lp/JavaLanguageScanner.rb', line 21

def initialize()
  
  super()
  
  @javadoc = nil
  @javadocClass = JavaDoc
  
end

Instance Attribute Details

#javadocObject (readonly)

The JavaDoc object



30
31
32
# File 'lib/cgialib/lp/JavaLanguageScanner.rb', line 30

def javadoc
  @javadoc
end

#javadocClassObject

The class to use to creat the JavaDoc object



32
33
34
# File 'lib/cgialib/lp/JavaLanguageScanner.rb', line 32

def javadocClass
  @javadocClass
end

Instance Method Details

#comment=(text) ⇒ Object

comment=( text )

text - The comment text

Override of the comment set method to not only set the comment but also to parse it into the JavaDoc



41
42
43
44
45
46
47
48
# File 'lib/cgialib/lp/JavaLanguageScanner.rb', line 41

def comment=( text )
  
super( text )
  
  @javadoc = @javadocClass.new() unless ( @javadoc )
  @javadoc.parse( text )
  
end