Logo Search packages:      
Sourcecode: jruby1.0 version File versions

org::jruby::javasupport::proxy::JavaProxyClass Class Reference

Inheritance diagram for org::jruby::javasupport::proxy::JavaProxyClass:

org::jruby::RubyObject org::jruby::runtime::builtin::IRubyObject

List of all members.


Detailed Description

Generalized proxy for classes and interfaces.

API looks a lot like java.lang.reflect.Proxy, except that you can specify a super class in addition to a set of interfaces.

The main implication for users of this class is to handle the case where a proxy method overrides an existing method, because in this case the invocation handler should "default" to calling the super implementation {JavaProxyMethod.invokeSuper}.

Author:
krab@trifork.com
See also:
java.lang.reflect.Proxy

Definition at line 79 of file JavaProxyClass.java.


Public Member Functions

void addFinalizer (RubyProc finalizer)
IRubyObject anyToString ()
IRubyObject aref (IRubyObject index)
IRubyObject aset (IRubyObject index, IRubyObject someValue)
RubyString asString ()
String asSymbol ()
void attachToObjectSpace ()
void callInit (IRubyObject[] args, Block block)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject arg)
IRubyObject callMethod (ThreadContext context, String name, Block block)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name)
IRubyObject callMethod (ThreadContext context, String name)
IRubyObject callMethod (ThreadContext context, RubyModule rubyclass, String name, IRubyObject[] args, CallType callType, Block block)
IRubyObject callMethod (ThreadContext context, RubyModule rubyclass, int methodIndex, String name, IRubyObject[] args, CallType callType, Block block)
IRubyObject callMethod (ThreadContext context, RubyModule rubyclass, int methodIndex, String name, IRubyObject[] args, CallType callType)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject[] args, CallType callType)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject[] args)
IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject arg)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, CallType callType, Block block)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, CallType callType)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, Block block)
IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args)
IRubyObject callSuper (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject checkArrayType ()
IRubyObject checkStringType ()
IRubyObject compilerCallMethod (ThreadContext context, String name, IRubyObject[] args, IRubyObject self, CallType callType, Block block)
IRubyObject compilerCallMethodWithIndex (ThreadContext context, int methodIndex, String name, IRubyObject[] args, IRubyObject self, CallType callType, Block block)
RubyArray constructors ()
RubyArray convertToArray ()
RubyFloat convertToFloat ()
RubyHash convertToHash ()
RubyInteger convertToInteger ()
RubyString convertToString ()
IRubyObject convertToType (RubyClass targetType, int convertMethodIndex, String convertMethod, boolean raiseOnMissingMethod, boolean raiseOnWrongTypeResult, boolean allowNilThrough)
IRubyObject convertToType (RubyClass targetType, int convertMethodIndex, boolean raise)
IRubyObject convertToType (RubyClass targetType, int convertMethodIndex, String convertMethod, boolean raise)
IRubyObject convertToTypeWithCheck (RubyClass targetType, int convertMethodIndex, String convertMethod)
synchronized Object dataGetStruct ()
synchronized void dataWrapStruct (Object obj)
IRubyObject display (IRubyObject[] args)
IRubyObject dup ()
boolean eql (IRubyObject other)
final boolean eqlInternal (final ThreadContext context, final IRubyObject other)
IRubyObject equal (IRubyObject other)
final IRubyObject equalInternal (final ThreadContext context, final IRubyObject other)
boolean equals (Object other)
IRubyObject evalSimple (ThreadContext context, IRubyObject src, String file)
IRubyObject evalUnder (RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line)
IRubyObject evalWithBinding (ThreadContext context, IRubyObject src, IRubyObject scope, String file)
IRubyObject extend (IRubyObject[] args)
IRubyObject freeze ()
RubyBoolean frozen ()
JavaProxyConstructor getConstructor (Class[] args) throws SecurityException, NoSuchMethodException
JavaProxyConstructor[] getConstructors ()
IRubyObject getInstanceVariable (String name)
Map getInstanceVariables ()
Map getInstanceVariablesSnapshot ()
Class[] getInterfaces ()
Class getJavaClass ()
final RubyClass getMetaClass ()
JavaProxyMethod getMethod (String name, Class[] parameterTypes)
JavaProxyMethod[] getMethods ()
int getNativeTypeIndex ()
Ruby getRuntime ()
RubyClass getSingletonClass ()
RubyClass getSingletonClassClone ()
Class getSuperclass ()
RubyClass getType ()
Object getValue ()
RubyFixnum hash ()
int hashCode ()
synchronized RubyFixnum id ()
synchronized RubyFixnum id_deprecated ()
IRubyObject infectBy (IRubyObject obj)
IRubyObject inherited (IRubyObject arg, Block block)
IRubyObject initialize (IRubyObject[] args, Block block)
IRubyObject initialize_copy (IRubyObject original)
IRubyObject inspect ()
IRubyObject instance_eval (IRubyObject[] args, Block block)
IRubyObject instance_exec (IRubyObject[] args, Block block)
RubyBoolean instance_of (IRubyObject type)
IRubyObject instance_variable_get (IRubyObject var)
IRubyObject instance_variable_set (IRubyObject var, IRubyObject value)
RubyArray instance_variables ()
Iterator instanceVariableNames ()
RubyArray interfaces ()
IRubyObject is_java_proxy ()
final boolean isFalse ()
boolean isFrozen ()
boolean isImmediate ()
boolean isKindOf (RubyModule type)
boolean isNil ()
boolean isSingleton ()
boolean isTaint ()
final boolean isTrue ()
IRubyObject java_class ()
RubyString java_type ()
RubyBoolean kind_of (IRubyObject type)
RubyFixnum length ()
RubyClass makeMetaClass (RubyClass superClass, SinglyLinkedList parentCRef)
IRubyObject match (IRubyObject arg)
IRubyObject method (IRubyObject symbol)
IRubyObject method_missing (IRubyObject[] args, Block block)
IRubyObject methods (IRubyObject[] args)
RubyArray methods ()
String nameOnInspection ()
IRubyObject nil_p ()
IRubyObject obj_equal (IRubyObject obj)
IRubyObject private_methods ()
IRubyObject protected_methods ()
IRubyObject public_methods (IRubyObject[] args)
IRubyObject rbClone (Block unusedBlock)
IRubyObject remove_instance_variable (IRubyObject name, Block block)
void removeFinalizers ()
IRubyObject removeInstanceVariable (String name)
RubyBoolean respond_to (IRubyObject[] args)
boolean respondsTo (String name)
Map safeGetInstanceVariables ()
boolean safeHasInstanceVariables ()
IRubyObject same (IRubyObject other)
IRubyObject send (IRubyObject[] args, Block block)
void setFrozen (boolean frozen)
IRubyObject setInstanceVariable (String name, IRubyObject value)
IRubyObject setInstanceVariable (String name, IRubyObject value, String taintError, String freezeError)
void setInstanceVariables (Map instanceVariables)
void setMetaClass (RubyClass metaClass)
void setTaint (boolean taint)
RubyArray singleton_methods (IRubyObject[] args)
IRubyObject specificEval (RubyModule mod, IRubyObject[] args, Block block)
RubyObject superclass ()
IRubyObject taint ()
RubyBoolean tainted ()
IRubyObject to_s ()
String toString ()
RubyClass type ()
RubyClass type_deprecated ()
IRubyObject untaint ()

Static Public Member Functions

static IRubyObject callMethodMissingIfNecessary (ThreadContext context, IRubyObject receiver, DynamicMethod method, String name, IRubyObject[] args, IRubyObject self, CallType callType, Block block)
static RubyClass createJavaProxyClassClass (Ruby runtime, RubyModule javaModule)
static void createJavaProxyModule (Ruby runtime)
static RubyClass createObjectClass (Ruby runtime, RubyClass objectClass)
static RubyObject get (IRubyObject recv, JavaClass type)
static RubyObject get_with_class (IRubyObject recv, RubyClass clazz)
static JavaProxyClass getProxyClass (Ruby runtime, Class superClass, Class[] interfaces) throws InvocationTargetException
static JavaProxyClass getProxyClass (Ruby runtime, Class superClass, Class[] interfaces, Set names) throws InvocationTargetException
static void initCopy (IRubyObject clone, IRubyObject original)
static Object newProxyInstance (Ruby runtime, Class superClass, Class[] interfaces, Class[] constructorParameters, Object[] constructorArgs, JavaProxyInvocationHandler handler) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException
static void puts (Object obj)
static String trueFalseNil (String v)
static String trueFalseNil (IRubyObject v)

Static Public Attributes

static final IRubyObject NEVER = new RubyObject()
static final IRubyObject[] NULL_ARRAY = new IRubyObject[0]
static ObjectAllocator OBJECT_ALLOCATOR

Protected Member Functions

RubyArray buildRubyArray (Class[] classes)
RubyArray buildRubyArray (IRubyObject[] constructors)
void checkFrozen ()
IRubyObject doClone ()
void testFrozen (String message)

Static Protected Member Functions

static void registerRubyMethods (Ruby runtime, RubyClass result)

Protected Attributes

Map instanceVariables
boolean isTrue = true
RubyClass metaClass

Package Functions

Class getProxyClass ()
JavaProxyMethod initMethod (String name, String desc, boolean hasSuper)
 JavaProxyClass (Class proxyClass)

Static Package Functions

 [static initializer]
 [static initializer]

Static Package Attributes

static ThreadLocal runtimeTLS = new ThreadLocal()

Static Private Member Functions

static Ruby getThreadLocalRuntime ()
static Class[] parse (final ClassLoader loader, String desc) throws ClassNotFoundException

Private Attributes

HashMap methodMap = new HashMap()
ArrayList methods = new ArrayList()
final Class proxyClass

Static Private Attributes

static final HashSet EXCLUDE_METHODS = new HashSet()
static final HashSet EXCLUDE_MODULES = new HashSet()

Classes

class  ProxyMethodImpl

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index