Top Fields Constructors Methods
org.jruby.javasupport.proxy

public Class JavaProxyConstructor

extends JavaProxyReflectionObject
implements ParameterTypes
Class Inheritance
All Implemented Interfaces
org.jruby.javasupport.ParameterTypes
Annotations
@JRubyClass
name:Java::JavaProxyConstructor
Imports
java.lang.reflect.Constructor, .InvocationTargetException, org.jruby.Ruby, .RubyArray, .RubyClass, .RubyFixnum, .RubyModule, .RubyProc, .RubyString, org.jruby.anno.JRubyClass, .JRubyMethod, org.jruby.exceptions.RaiseException, org.jruby.java.invokers.RubyToJavaInvoker, org.jruby.javasupport.Java, .ParameterTypes, org.jruby.runtime.Helpers, .Arity, .Block, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ArraySupport

Field Summary

Modifier and TypeField and Description
private final Class<?>[]
private final boolean
private final JavaProxyClass
private final boolean
private final Constructor<?>

Constructor Summary

AccessConstructor and Description
pack-priv
JavaProxyConstructor(Ruby runtime, JavaProxyClass proxyClass, Constructor<?> constructor)

Method Summary

Modifier and TypeMethod and Description
public final RubyArray<T extends IRubyObject>
argument_types()
Deprecated since 10.0.

public final RubyArray<T extends IRubyObject>
public RubyFixnum
arity()
Deprecated since 10.0.

public RubyFixnum
private Object[]
convertArguments(final RubyArray<T extends IRubyObject> arguments)

public static RubyClass
public boolean
equals(Object
object to compare
other
)

Overrides org.jruby.javasupport.proxy.JavaProxyReflectionObject.equals.

This override does not do a "checked" dispatch.

public final int
public JavaProxyClass
public final Class<?>[]
public final Class<?>[]
public int
hashCode()

Overrides org.jruby.javasupport.proxy.JavaProxyReflectionObject.hashCode.

This override does not do "checked" dispatch since Object usually has #hash defined.

public RubyString
inspect()

Overrides org.jruby.RubyBasicObject.inspect.

Implements org.jruby.runtime.builtin.IRubyObject.inspect.

Deprecated since 10.0.

RubyMethod inspect.

public RubyString
inspect(ThreadContext context)

Overrides org.jruby.RubyBasicObject.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Returns a string containing a human-readable representation of obj.

public final boolean
public final boolean
public static RaiseException
mapInstantiationException(final Ruby runtime, final Throwable e)

public IRubyObject
new_instance(IRubyObject[] args, Block block)
Deprecated

public IRubyObject
new_instance(ThreadContext context, IRubyObject[] args, Block block)

public IRubyObject
new_instance2(ThreadContext context, IRubyObject[] args, Block unusedBlock)

public final Object
newInstance(Object[] args, Ruby runtime, IRubyObject clazz)

public final IRubyObject
newInstance(final Ruby runtime, final IRubyObject self, Object[] args)

public final IRubyObject
newInstance(final Ruby runtime, final IRubyObject self, IRubyObject[] args)

public final IRubyObject
newInstance(final Ruby runtime, final IRubyObject self, IRubyObject arg0)

pack-priv final Object
newInstanceImpl(Object[] argsPlus1, Ruby runtime, IRubyObject clazz)

For exportable objects, argsPlus1 is not plus one

public static RuntimeException
public String
toString()

Overrides org.jruby.javasupport.proxy.JavaProxyReflectionObject.toString.

The default toString method is just a wrapper that calls the Ruby "to_s" method.

private static IRubyObject
wrapJavaObject(final Ruby runtime, final Object obj)

Inherited from org.jruby.javasupport.proxy.JavaProxyReflectionObject:
arefarefasetasethashis_java_proxyis_java_proxyjava_classjava_classjava_typejava_typelengthlengthop_eqqop_equalop_equalregisterRubyMethodssameto_stoClassArraytoRubyArray

Field Detail

actualParameterTypesback to summary
private final Class<?>[] actualParameterTypes
actualVarArgsback to summary
private final boolean actualVarArgs
declaringProxyClassback to summary
private final JavaProxyClass declaringProxyClass
exportableback to summary
private final boolean exportable
proxyConstructorback to summary
private final Constructor<?> proxyConstructor

Constructor Detail

JavaProxyConstructorback to summary
pack-priv JavaProxyConstructor(Ruby runtime, JavaProxyClass proxyClass, Constructor<?> constructor)

Method Detail

argument_typesback to summary
public final RubyArray<T extends IRubyObject> argument_types()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
argument_typesback to summary
public final RubyArray<T extends IRubyObject> argument_types(ThreadContext context)
Annotations
@JRubyMethod
arityback to summary
public RubyFixnum arity()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
arityback to summary
public RubyFixnum arity(ThreadContext context)
Annotations
@JRubyMethod
convertArgumentsback to summary
private Object[] convertArguments(final RubyArray<T extends IRubyObject> arguments)
createJavaProxyConstructorClassback to summary
public static RubyClass createJavaProxyConstructorClass(ThreadContext context, RubyClass Object, RubyModule Java)
equalsback to summary
public boolean equals(Object other)

Overrides org.jruby.javasupport.proxy.JavaProxyReflectionObject.equals.

Doc from org.jruby.RubyObject.equals.

This override does not do a "checked" dispatch.

Parameters
other:Object

Doc from org.jruby.RubyBasicObject.equals.

object to compare

Returns:boolean

Doc from org.jruby.RubyBasicObject.equals.

true if equals

Annotations
@Override
getArityback to summary
public final int getArity()

Implements org.jruby.javasupport.ParameterTypes.getArity.

getDeclaringClassback to summary
public JavaProxyClass getDeclaringClass()
Annotations
@JRubyMethod
name:declaring_class
getExceptionTypesback to summary
public final Class<?>[] getExceptionTypes()

Implements org.jruby.javasupport.ParameterTypes.getExceptionTypes.

getParameterTypesback to summary
public final Class<?>[] getParameterTypes()

Implements org.jruby.javasupport.ParameterTypes.getParameterTypes.

hashCodeback to summary
public int hashCode()

Overrides org.jruby.javasupport.proxy.JavaProxyReflectionObject.hashCode.

Doc from org.jruby.RubyObject.hashCode.

This override does not do "checked" dispatch since Object usually has #hash defined.

Returns:int

the hash code

Annotations
@Override
inspectback to summary
public RubyString inspect()

Overrides org.jruby.RubyBasicObject.inspect.

Implements org.jruby.runtime.builtin.IRubyObject.inspect.

Doc from org.jruby.runtime.builtin.IRubyObject.inspect.

Deprecated

since 10.0.

RubyMethod inspect.

Returns:RubyString

String

Annotations
@Deprecated
since:10.0
inspectback to summary
public RubyString inspect(ThreadContext context)

Overrides org.jruby.RubyBasicObject.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Doc from org.jruby.RubyBasicObject.inspect.

Returns a string containing a human-readable representation of obj. If not overridden, uses the to_s method to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"

Annotations
@Override
@JRubyMethod
isExportableback to summary
public final boolean isExportable()
isVarArgsback to summary
public final boolean isVarArgs()

Implements org.jruby.javasupport.ParameterTypes.isVarArgs.

mapInstantiationExceptionback to summary
public static RaiseException mapInstantiationException(final Ruby runtime, final Throwable e)
new_instanceback to summary
public IRubyObject new_instance(IRubyObject[] args, Block block)

Deprecated

Annotations
@Deprecated
new_instanceback to summary
public IRubyObject new_instance(ThreadContext context, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
required:1
optional:1
checkArity:false
new_instance2back to summary
public IRubyObject new_instance2(ThreadContext context, IRubyObject[] args, Block unusedBlock)
Annotations
@JRubyMethod
rest:true
newInstanceback to summary
public final Object newInstance(Object[] args, Ruby runtime, IRubyObject clazz) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
newInstanceback to summary
public final IRubyObject newInstance(final Ruby runtime, final IRubyObject self, Object[] args) throws RaiseException
newInstanceback to summary
public final IRubyObject newInstance(final Ruby runtime, final IRubyObject self, IRubyObject[] args) throws RaiseException
newInstanceback to summary
public final IRubyObject newInstance(final Ruby runtime, final IRubyObject self, IRubyObject arg0) throws RaiseException
newInstanceImplback to summary
pack-priv final Object newInstanceImpl(Object[] argsPlus1, Ruby runtime, IRubyObject clazz) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException

For exportable objects, argsPlus1 is not plus one

throwInstantiationExceptionCauseback to summary
public static RuntimeException throwInstantiationExceptionCause(final Ruby runtime, final ReflectiveOperationException e)
toStringback to summary
public String toString()

Overrides org.jruby.javasupport.proxy.JavaProxyReflectionObject.toString.

Doc from org.jruby.RubyObject.toString.

The default toString method is just a wrapper that calls the Ruby "to_s" method.

Returns:String

string representation

Annotations
@Override
wrapJavaObjectback to summary
private static IRubyObject wrapJavaObject(final Ruby runtime, final Object obj)