Module: Buby::Implants::Parameter
- Defined in:
- lib/buby/implants/parameter.rb
Overview
This interface is used to hold details about an HTTP request parameter.
Class Method Summary collapse
-
.implant(parameter) ⇒ Object
Install ourselves into the current
IParameter
java class.
Instance Method Summary collapse
-
#getNameEnd ⇒ Fixnum?
This method is used to retrieve the end offset of the parameter name within the HTTP request.
-
#getNameStart ⇒ Fixnum?
This method is used to retrieve the start offset of the parameter name within the HTTP request.
-
#getValueEnd ⇒ Fixnum?
This method is used to retrieve the end offset of the parameter value within the HTTP request.
-
#getValueStart ⇒ Fixnum?
This method is used to retrieve the start offset of the parameter value within the HTTP request.
Class Method Details
.implant(parameter) ⇒ Object
Install ourselves into the current IParameter
java class
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/buby/implants/parameter.rb', line 58 def self.implant(parameter) unless parameter.implanted? || parameter.nil? pp [:implanting, parameter, parameter.class] if $DEBUG parameter.class.class_exec(parameter) do |parameter| a_methods = %w{ getNameStart getNameEnd getValueEnd getValueStart } a_methods.each do |meth| alias_method "__"+meth.to_s, meth end include Buby::Implants::Parameter a_methods.each do |meth| java_class.ruby_names_for_java_method(meth).each do |ruby_meth| define_method ruby_meth, Buby::Implants::Parameter.instance_method(meth) end end include Buby::Implants::Proxy end end parameter end |
Instance Method Details
#getNameEnd ⇒ Fixnum?
This method is used to retrieve the end offset of the parameter name within the HTTP request.
26 27 28 29 |
# File 'lib/buby/implants/parameter.rb', line 26 def getNameEnd ret = __getNameEnd ret == -1 ? nil : ret end |
#getNameStart ⇒ Fixnum?
This method is used to retrieve the start offset of the parameter name within the HTTP request.
14 15 16 17 |
# File 'lib/buby/implants/parameter.rb', line 14 def getNameStart ret = __getNameStart ret == -1 ? nil : ret end |
#getValueEnd ⇒ Fixnum?
This method is used to retrieve the end offset of the parameter value within the HTTP request.
50 51 52 53 |
# File 'lib/buby/implants/parameter.rb', line 50 def getValueEnd ret = __getValueEnd ret == -1 ? nil : ret end |
#getValueStart ⇒ Fixnum?
This method is used to retrieve the start offset of the parameter value within the HTTP request.
38 39 40 41 |
# File 'lib/buby/implants/parameter.rb', line 38 def getValueStart ret = __getValueStart ret == -1 ? nil : ret end |