Class: LanguageParser::JavaPrototype

Inherits:
Prototype
  • Object
show all
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

Attributes inherited from Prototype

#arguments, #class_name, #comments, #method_name, #method_type, #static, #visibility

Instance Method Summary collapse

Methods inherited from Prototype

#add_argument, #to_s

Constructor Details

#initializeJavaPrototype

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

#javadocObject (readonly)

The JavaDoc attached to the method



114
115
116
# File 'lib/cgialib/lp/JavaLanguageScanner.rb', line 114

def javadoc
  @javadoc
end

#javadocClassObject

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