Class: LanguageParser::JavaPrototype
- Defined in:
- lib/cgialib/lp/JavaLanguageScanner.rb
Overview
class : JavaPrototype
A derived class of Prototype to account for the JavaDoc attached to the prototype
Instance Attribute Summary collapse
-
#javadoc ⇒ Object
readonly
The JavaDoc attached to the method.
-
#javadocClass ⇒ Object
The class to build the JavaDoc object.
Attributes inherited from Prototype
#arguments, #class_name, #comments, #method_name, #method_type, #static, #visibility
Instance Method Summary collapse
-
#add_comment(text) ⇒ Object
add_comment( text ).
-
#initialize ⇒ JavaPrototype
constructor
initialize().
Methods inherited from Prototype
Constructor Details
#initialize ⇒ JavaPrototype
initialize()
Constructor for the class
105 106 107 108 109 110 111 112 |
# File 'lib/cgialib/lp/JavaLanguageScanner.rb', line 105 def initialize() super() @javadoc = nil @javadocClass = JavaDoc end |
Instance Attribute Details
#javadoc ⇒ Object (readonly)
The JavaDoc attached to the method
114 115 116 |
# File 'lib/cgialib/lp/JavaLanguageScanner.rb', line 114 def javadoc @javadoc end |
#javadocClass ⇒ Object
The class to build the JavaDoc object
116 117 118 |
# File 'lib/cgialib/lp/JavaLanguageScanner.rb', line 116 def javadocClass @javadocClass end |
Instance Method Details
#add_comment(text) ⇒ Object
add_comment( text )
text - The comment text
Overrides the add_comment method to account for the JavaDoc as well as adding the comment.
125 126 127 128 129 130 131 132 |
# File 'lib/cgialib/lp/JavaLanguageScanner.rb', line 125 def add_comment( text ) super( text ) @javadoc = @javadocClass.new() unless ( @javadoc ) @javadoc.parse( text.to_s ) end |