Class: JavaParse::JavaMethod
- Inherits:
-
Object
- Object
- JavaParse::JavaMethod
- Defined in:
- lib/javaparse/java_method.rb
Instance Attribute Summary collapse
-
#clazz ⇒ Object
readonly
Returns the value of attribute clazz.
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
Instance Method Summary collapse
-
#initialize(clazz, signature, lines_count) ⇒ JavaMethod
constructor
A new instance of JavaMethod.
- #to_s ⇒ Object
Constructor Details
#initialize(clazz, signature, lines_count) ⇒ JavaMethod
Returns a new instance of JavaMethod.
7 8 9 10 11 12 |
# File 'lib/javaparse/java_method.rb', line 7 def initialize(clazz, signature, lines_count) @clazz = clazz @signature = signature.delete('{').strip @name = @signature.match(/.*\s(.*)\(.*\)/)[1] @lines = lines_count end |
Instance Attribute Details
#clazz ⇒ Object (readonly)
Returns the value of attribute clazz.
5 6 7 |
# File 'lib/javaparse/java_method.rb', line 5 def clazz @clazz end |
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
5 6 7 |
# File 'lib/javaparse/java_method.rb', line 5 def lines @lines end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/javaparse/java_method.rb', line 5 def name @name end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
5 6 7 |
# File 'lib/javaparse/java_method.rb', line 5 def signature @signature end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/javaparse/java_method.rb', line 14 def to_s "#{self.class}, signature=#{signature}, name=#{name}, class=#{clazz}, lines=#{lines}" end |