<init>(String name, org.jruby.RubyModule host, java.lang.reflect.Field field)call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name)adjustAliasCount(int delta)getAliasCount() · also: get_alias_countisBuiltin() · also: is_builtinWhether this method is a builtin method, i.e. a method built-in to JRuby and loaded during its core boot process.
Returns: true if this is a core built-in method, false otherwise
call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule klazz, String name, org.jruby.runtime.builtin.IRubyObject arg0)call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule klazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1)call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule klazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2)callRespondTo(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, String respondToMethodName, org.jruby.RubyModule klazz, org.jruby.RubySymbol name)Get the original owner of this method/
Returns: the module method was defined in
setDefinedClass(org.jruby.RubyModule definedClass) · also: set_defined_classSet the defining class for this method, as when restructuring hierarchy for prepend.
| name | type | description |
|---|---|---|
| defined_class | org.jruby.RubyModule | that method was defined in |
getHandle() · also: get_handleGet the "handle" associated with this DynamicMethod.
Returns: the handle
setHandle(Object handle) · also: set_handleSet the "handle" associated with this DynamicMethod.
| name | type | description |
|---|---|---|
| handle | Object | the handle |
Retrieve the class or module on which this method is implemented, used for 'super' logic among others.
Returns: The class on which this method is implemented
setImplementationClass(org.jruby.RubyModule implClass) · also: set_implementation_classSet the class on which this method is implemented, used for 'super' logic, among others.
| name | type | description |
|---|---|---|
| impl_class | org.jruby.RubyModule | The class on which this method is implemented |
getInstanceVariableNames() · also: get_instance_variable_namessetIsBuiltin(boolean isBuiltin) · also: set_is_builtinForce this method to be treated as a core built-in method if true, or as a normal non-core method otherwise.
| name | type | description |
|---|---|---|
| is_builtin | boolean | true if this is a core built-in method, false otherwise |
isCallableFrom(org.jruby.runtime.builtin.IRubyObject caller, org.jruby.runtime.CallType callType)Determine whether this method is callable from the given object using the given call type.
| name | type | description |
|---|---|---|
| caller | org.jruby.runtime.builtin.IRubyObject | The calling object |
| call_type | org.jruby.runtime.CallType | The type of call |
Returns: true if the call would not violate visibility; false otherwise
Additional metadata about this method.
Returns: method data (defined in sub classes)
getName() · also: get_nameGet the base name this method was defined as.
Returns: the base name for the method
setNotImplemented(boolean setNotImplemented) · also: set_not_implementedSet whether this method is "not implemented".
| name | type | description |
|---|---|---|
| set_not_implemented | boolean | is this not implement or not |
isNotImplemented() · also: is_not_implementedWhether this method is "not implemented". This is primarily to support Ruby 1.9's behavior of respond_to? yielding false if the feature in question is unsupported (but still having the method defined).
Returns: is this a method which is marked as not implemented
isNull() · also: is_nullWhether this method is the "null" method, used to stop method name resolution loops. Only returns true for NullMethod instances, of which there should be only one (a singleton).
Returns: true if this method is the undefined method; false otherwise
Get the "real" method contained within this method. This simply returns self except in cases where a method is wrapped to give it a new name or new implementation class (AliasMethod, PartialDelegatingMethod, ...).
Returns: The "real" method associated with this one
isRefined() · also: is_refinedgetSerialNumber() · also: get_serial_numberGet the global serial number for this method object
Returns: This method object's serial number
setRuby2Keywords()Indicates the method will behave like a ruby2 keywords accepting method. This must be a Ruby implementation to work. See Module#ruby2_keywords for information on the semantics of a method which is marked this way.
isUndefined() · also: is_undefinedWhether this method is the "undefined" method, used to represent a missing or undef'ed method. Only returns true for UndefinedMethod instances, of which there should be only one (a singleton).
Returns: true if this method is the undefined method; false otherwise
Get the visibility of this method.
Returns: The visibility of this method
setVisibility(org.jruby.runtime.Visibility visibility) · also: set_visibilitySet the visibility of this method.
| name | type | description |
|---|---|---|
| visibility | org.jruby.runtime.Visibility | The visibility of this method |
| field | type | note |
|---|---|---|
| BLOCK_METHODS | Class[][] | |
| BLOCK_REST_METHODS | Class[][] | |
| METHODS | Class[][] | |
| NAME_PASSER | ThreadLocal<String> | Used for old-style nameless constructor to pass name in out-of-band. |
| REST_METHODS | Class[][] |
getJavaName() · also: get_java_namesetJavaName(String javaName) · also: set_java_nameisNative() · also: is_nativesetParameterDesc(String parameterDesc) · also: set_parameter_descgetParameterList() · also: get_parameter_listsetParameterList(String[] parameterList) · also: set_parameter_listsetNativeCall(Class nativeTarget, String nativeName, Class nativeReturn, Class[] nativeSignature, boolean statik, boolean java)setNativeCall(Class nativeTarget, String nativeName, Class nativeReturn, Class[] nativeSignature, boolean statik)setSignature(org.jruby.runtime.Signature signature) · also: set_signaturesetSingleton(boolean isSingleton) · also: set_singletonisSingleton() · also: is_singletoncall(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.Block block)call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.Block block)call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, org.jruby.runtime.Block block)call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.Block block)call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject[] args)getField() · also: get_field