Class ConcreteJavaProxy

All Implemented Interfaces:
Serializable, Cloneable, Comparable<IRubyObject>, InstanceVariables, InternalVariables, IRubyObject, CoreObjectType
Direct Known Subclasses:
MapJavaProxy

public class ConcreteJavaProxy extends JavaProxy
See Also:
  • Constructor Details

    • ConcreteJavaProxy

      public ConcreteJavaProxy(Ruby runtime, RubyClass klazz)
    • ConcreteJavaProxy

      public ConcreteJavaProxy(Ruby runtime, RubyClass klazz, Object object)
  • Method Details

    • createConcreteJavaProxy

      public static RubyClass createConcreteJavaProxy(ThreadContext context, RubyClass JavaProxy)
    • findSuperLine

      public static int findSuperLine(Ruby runtime, DynamicMethod dm, int start)
    • splitInitialized

      public ConcreteJavaProxy.SplitCtorData splitInitialized(RubyClass base, IRubyObject[] args, Block block, Java.JCtorCache jcc)
      Used by reified classes, this method is tightly coupled with RealClassGenerator, finishInitialize Do not refactor without looking at RCG
      Returns:
      An object used by reified code and the finishInitialize method
    • finishInitialize

      public void finishInitialize(ConcreteJavaProxy.SplitCtorData returned)
      Used by reified classes, this method is tightly coupled with RealClassGenerator, splitInitialize Do not refactor without looking at RCG

      Note: invoked from generated byte-code

    • ensureThis

      public void ensureThis(Object self)
    • initialize

      @Deprecated(since="10.0") protected static void initialize(RubyClass concreteJavaProxy)
      Deprecated.
    • initialize

      protected static void initialize(ThreadContext context, RubyClass concreteJavaProxy)
    • id

      public IRubyObject id()
      Because we can't physically associate an ID with a Java object, we can only use the identity hashcode here.
      Specified by:
      id in interface IRubyObject
      Overrides:
      id in class RubyBasicObject
      Returns:
      The identity hashcode for the Java object.
    • toJava

      public <T> T toJava(Class<T> type)
      Description copied from interface: IRubyObject
      Convert the object to the specified Java class, if possible.
      Specified by:
      toJava in interface IRubyObject
      Overrides:
      toJava in class JavaProxy
      Type Parameters:
      T - type
      Parameters:
      type - The target type to which the object should be converted.
      Returns:
      java type
      See Also: