Module: Guff::JavaSource::ThrowsSupport

Included in:
Constructor
Defined in:
lib/guff/java_source.rb

Instance Method Summary collapse

Instance Method Details

#append_throws_clause(writer) ⇒ Object



171
172
173
174
175
# File 'lib/guff/java_source.rb', line 171

def append_throws_clause(writer)
    if (!exceptions.empty?)
        writer.append(' throws ').append(exceptions.join(', '))
    end
end

#exceptionsObject



177
178
179
# File 'lib/guff/java_source.rb', line 177

def exceptions
    @exceptions ||= []
end

#throws(exception) ⇒ Object



166
167
168
169
# File 'lib/guff/java_source.rb', line 166

def throws(exception)
    exceptions << exception
    self
end