org.jruby.javasupport.proxy
Class JavaProxyClass.ProxyMethodImpl

java.lang.Object
  extended by org.jruby.RubyObject
      extended by org.jruby.javasupport.proxy.JavaProxyReflectionObject
          extended by org.jruby.javasupport.proxy.JavaProxyClass.ProxyMethodImpl
All Implemented Interfaces:
java.lang.Cloneable, JavaProxyMethod, IRubyObject
Enclosing class:
JavaProxyClass

public static class JavaProxyClass.ProxyMethodImpl
extends JavaProxyReflectionObject
implements JavaProxyMethod


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
JavaProxyClass.ProxyMethodImpl(Ruby runtime, JavaProxyClass clazz, java.lang.reflect.Method m, java.lang.reflect.Method sm)
           
 
Method Summary
 RubyArray argument_types()
           
 RubyFixnum arity()
           
static RubyClass createJavaProxyMethodClass(Ruby runtime, RubyModule javaProxyModule)
           
 java.lang.Object defaultResult()
           
 IRubyObject do_invoke(IRubyObject[] nargs)
           
 JavaProxyClass getDeclaringClass()
           
 java.lang.Class[] getExceptionTypes()
           
 java.lang.reflect.Method getMethod()
           
 int getModifiers()
           
 java.lang.String getName()
           
 java.lang.Class[] getParameterTypes()
           
 java.lang.Class getReturnType()
           
 java.lang.Object getState()
          get state (cache target callable?) in the proxy method
 java.lang.reflect.Method getSuperMethod()
           
 boolean hasSuperImplementation()
          is it possible to call the super method?
 IRubyObject inspect()
          rb_obj_inspect
 java.lang.Object invoke(java.lang.Object proxy, java.lang.Object[] args)
           
 boolean matches(java.lang.String name, java.lang.Class[] parameterTypes)
           
 RubyObject name()
           
protected  java.lang.String nameOnInspection()
           
 void setState(java.lang.Object state)
          store state (cache target callable?) in the proxy method
 IRubyObject super_p()
           
 java.lang.String toString()
           
 
Methods inherited from class org.jruby.javasupport.proxy.JavaProxyReflectionObject
aref, aset, buildRubyArray, buildRubyArray, equal, equals, hash, hashCode, is_java_proxy, java_class, java_type, length, registerRubyMethods, same, to_s
 
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, evalSimple, evalUnder, evalWithBinding, extend, freeze, frozen, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getJavaClass, getMetaClass, getNativeTypeIndex, getRuntime, getSingletonClass, getSingletonClassClone, getType, 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, trueFalseNil, trueFalseNil, type_deprecated, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jruby.runtime.builtin.IRubyObject
addFinalizer, anyToString, asString, asSymbol, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkStringType, compilerCallMethod, compilerCallMethodWithIndex, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToString, convertToType, convertToType, convertToTypeWithCheck, dataGetStruct, dataWrapStruct, dup, eql, eqlInternal, equal, equalInternal, evalSimple, evalWithBinding, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getJavaClass, getMetaClass, getNativeTypeIndex, getRuntime, getSingletonClass, getType, id, infectBy, instanceVariableNames, isFrozen, isImmediate, isKindOf, isNil, isSingleton, isTaint, isTrue, rbClone, removeFinalizers, respondsTo, safeGetInstanceVariables, safeHasInstanceVariables, setFrozen, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint
 

Constructor Detail

JavaProxyClass.ProxyMethodImpl

public JavaProxyClass.ProxyMethodImpl(Ruby runtime,
                                      JavaProxyClass clazz,
                                      java.lang.reflect.Method m,
                                      java.lang.reflect.Method sm)
Method Detail

getMethod

public java.lang.reflect.Method getMethod()

getSuperMethod

public java.lang.reflect.Method getSuperMethod()
Specified by:
getSuperMethod in interface JavaProxyMethod

getModifiers

public int getModifiers()
Specified by:
getModifiers in interface JavaProxyMethod

getName

public java.lang.String getName()
Specified by:
getName in interface JavaProxyMethod

getExceptionTypes

public java.lang.Class[] getExceptionTypes()
Specified by:
getExceptionTypes in interface JavaProxyMethod

getParameterTypes

public java.lang.Class[] getParameterTypes()
Specified by:
getParameterTypes in interface JavaProxyMethod

getState

public java.lang.Object getState()
Description copied from interface: JavaProxyMethod
get state (cache target callable?) in the proxy method

Specified by:
getState in interface JavaProxyMethod

hasSuperImplementation

public boolean hasSuperImplementation()
Description copied from interface: JavaProxyMethod
is it possible to call the super method?

Specified by:
hasSuperImplementation in interface JavaProxyMethod

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.Object[] args)
                        throws java.lang.IllegalArgumentException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException,
                               java.lang.NoSuchMethodException
Specified by:
invoke in interface JavaProxyMethod
Returns:
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException - if this ProxyMethod has no super implementation

setState

public void setState(java.lang.Object state)
Description copied from interface: JavaProxyMethod
store state (cache target callable?) in the proxy method

Specified by:
setState in interface JavaProxyMethod

toString

public java.lang.String toString()
Overrides:
toString in class JavaProxyReflectionObject

defaultResult

public java.lang.Object defaultResult()
Specified by:
defaultResult in interface JavaProxyMethod

matches

public boolean matches(java.lang.String name,
                       java.lang.Class[] parameterTypes)

getReturnType

public java.lang.Class getReturnType()
Specified by:
getReturnType in interface JavaProxyMethod

createJavaProxyMethodClass

public static RubyClass createJavaProxyMethodClass(Ruby runtime,
                                                   RubyModule javaProxyModule)

name

public RubyObject name()

getDeclaringClass

public JavaProxyClass getDeclaringClass()
Specified by:
getDeclaringClass in interface JavaProxyMethod

argument_types

public RubyArray argument_types()

super_p

public IRubyObject super_p()

arity

public RubyFixnum arity()

nameOnInspection

protected java.lang.String nameOnInspection()

inspect

public IRubyObject inspect()
Description copied from class: RubyObject
rb_obj_inspect

Specified by:
inspect in interface IRubyObject
Overrides:
inspect in class RubyObject
Returns:
String

do_invoke

public IRubyObject do_invoke(IRubyObject[] nargs)


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