org.jruby.javasupport
Class JavaMethod

java.lang.Object
  extended by org.jruby.RubyObject
      extended by org.jruby.javasupport.JavaAccessibleObject
          extended by org.jruby.javasupport.JavaCallable
              extended by org.jruby.javasupport.JavaMethod
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject

public class JavaMethod
extends JavaCallable


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.Finalizer
 
Field Summary
 
Fields inherited from class org.jruby.RubyObject
instanceVariables, isTrue, metaClass, NEVER, OBJECT_ALLOCATOR
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
JavaMethod(Ruby runtime, java.lang.reflect.Method method)
           
 
Method Summary
protected  java.lang.reflect.AccessibleObject accesibleObject()
           
static JavaMethod create(Ruby runtime, java.lang.Class javaClass, java.lang.String methodName, java.lang.Class[] argumentTypes)
           
static JavaMethod create(Ruby runtime, java.lang.reflect.Method method)
           
static JavaMethod createDeclared(Ruby runtime, java.lang.Class javaClass, java.lang.String methodName, java.lang.Class[] argumentTypes)
           
static RubyClass createJavaMethodClass(Ruby runtime, RubyModule javaModule)
           
 RubyBoolean final_p()
           
protected  int getArity()
           
protected  int getModifiers()
           
 IRubyObject invoke_static(IRubyObject[] args)
           
 IRubyObject invoke(IRubyObject[] args)
           
 RubyString name()
           
protected  java.lang.String nameOnInspection()
           
protected  java.lang.Class[] parameterTypes()
           
 RubyBoolean public_p()
           
 IRubyObject return_type()
           
 RubyBoolean static_p()
           
 
Methods inherited from class org.jruby.javasupport.JavaCallable
argument_types, arity, inspect, registerRubyMethods
 
Methods inherited from class org.jruby.javasupport.JavaAccessibleObject
equal, hash, isAccessible, registerRubyMethods, same, setAccessible
 
Methods inherited from class org.jruby.RubyObject
addFinalizer, anyToString, asString, asSymbol, attachToObjectSpace, callInit, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodMissing, callMethodMissing, callSuper, checkArrayType, checkFrozen, checkStringType, compilerCallMethod, compilerCallMethodWithIndex, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToString, convertToType, convertToType, convertToType, convertToTypeWithCheck, createObjectClass, dataGetStruct, dataWrapStruct, display, doClone, dup, eql, eqlInternal, equalInternal, equals, evalSimple, evalUnder, evalWithBinding, extend, freeze, frozen, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getJavaClass, getMetaClass, getNativeTypeIndex, getRuntime, getSingletonClass, getSingletonClassClone, getType, hashCode, id_deprecated, id, infectBy, inherited, initCopy, initialize_copy, initialize, instance_eval, instance_exec, instance_of, instance_variable_get, instance_variable_set, instance_variables, instanceVariableNames, isFalse, isFrozen, isImmediate, isKindOf, isNil, isSingleton, isTaint, isTrue, kind_of, makeMetaClass, match, method, methods, nil_p, obj_equal, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, removeFinalizers, removeInstanceVariable, respond_to, respondsTo, safeGetInstanceVariables, safeHasInstanceVariables, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, singleton_methods, specificEval, taint, tainted, testFrozen, to_s, toString, trueFalseNil, trueFalseNil, type_deprecated, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaMethod

public JavaMethod(Ruby runtime,
                  java.lang.reflect.Method method)
Method Detail

createJavaMethodClass

public static RubyClass createJavaMethodClass(Ruby runtime,
                                              RubyModule javaModule)

create

public static JavaMethod create(Ruby runtime,
                                java.lang.reflect.Method method)

create

public static JavaMethod create(Ruby runtime,
                                java.lang.Class javaClass,
                                java.lang.String methodName,
                                java.lang.Class[] argumentTypes)

createDeclared

public static JavaMethod createDeclared(Ruby runtime,
                                        java.lang.Class javaClass,
                                        java.lang.String methodName,
                                        java.lang.Class[] argumentTypes)

name

public RubyString name()

getArity

protected int getArity()
Specified by:
getArity in class JavaCallable

public_p

public RubyBoolean public_p()
Overrides:
public_p in class JavaCallable

final_p

public RubyBoolean final_p()

invoke

public IRubyObject invoke(IRubyObject[] args)

invoke_static

public IRubyObject invoke_static(IRubyObject[] args)

return_type

public IRubyObject return_type()

parameterTypes

protected java.lang.Class[] parameterTypes()
Specified by:
parameterTypes in class JavaCallable

nameOnInspection

protected java.lang.String nameOnInspection()
Specified by:
nameOnInspection in class JavaCallable
Returns:
the name used in the head of the string returned from inspect()

static_p

public RubyBoolean static_p()

getModifiers

protected int getModifiers()
Specified by:
getModifiers in class JavaCallable

accesibleObject

protected java.lang.reflect.AccessibleObject accesibleObject()
Specified by:
accesibleObject in class JavaAccessibleObject


Copyright © 2002-2007 JRuby Team. All Rights Reserved.