Package org.jruby

Class RubyClass

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

public class RubyClass extends RubyModule
See Also:
  • Field Details

    • CLASS_ALLOCATOR

      public static final ObjectAllocator CLASS_ALLOCATOR
    • DEFAULT_OBJECT_MARSHAL

      protected static final ObjectMarshal DEFAULT_OBJECT_MARSHAL
    • runtime

      protected final Ruby runtime
    • marshal

      protected ObjectMarshal marshal
    • CS_IDX_INITIALIZE

      public static final int CS_IDX_INITIALIZE
      See Also:
  • Constructor Details

    • RubyClass

      protected RubyClass(Ruby runtime, RubyClass superClass, boolean objectSpace)
      separate path for MetaClass and IncludedModuleWrapper construction (rb_class_boot version for MetaClasses) no marshal, allocator initialization and addSubclass(this) here!
    • RubyClass

      protected RubyClass(Ruby runtime, RubyClass superClass, RubyClass Class)
      This is an internal API only used by Ruby constructor before ThreadContext exists.
      Parameters:
      runtime -
      superClass -
      Class -
    • RubyClass

      protected RubyClass(Ruby runtime)
      used by CLASS_ALLOCATOR (any Class' class will be a Class!) also used to bootstrap Object class
    • RubyClass

      protected RubyClass(Ruby runtime, RubyClass superClazz)
      rb_class_boot (for plain Classes) also used to bootstrap Module and Class classes
    • RubyClass

      protected RubyClass(Ruby runtime, RubyClass superClazz, CallSite[] extraCallSites)
      A constructor which allows passing in an array of supplementary call sites.
  • Method Details

    • finishClassClass

      public static void finishClassClass(Ruby runtime, RubyClass Class)
    • finishCreateClassClass

      public static void finishCreateClassClass(ThreadContext context, RubyClass Class)
    • getAllocator

      public ObjectAllocator getAllocator()
    • setAllocator

      @Deprecated(since="10.0.0.0") public void setAllocator(ObjectAllocator allocator)
      Deprecated.
      Parameters:
      allocator -
    • allocator

      public <T extends RubyClass> T allocator(ObjectAllocator allocator)
      Define an allocator for this class (usually this is part of Define.defineClass(ThreadContext, String, RubyClass, ObjectAllocator)).
      Parameters:
      allocator - to use
      Returns:
      itself for a composable API
    • marshalWith

      public <T extends RubyClass> T marshalWith(ObjectMarshal marshal)
      Set what marshaller we use or generally use this to specify the typw cannot Marshal data.
      Parameters:
      marshal - the marshaller
      Returns:
      itself for composable API
    • reifiedClass

      public <T extends RubyClass> T reifiedClass(Class<? extends IRubyObject> reifiedClass)
      Sets reified class to use.
      Parameters:
      reifiedClass - the java type to use
      Returns:
      itself for composable API
    • setClassAllocator

      public void setClassAllocator(Class<?> clazz)
      Set a reflective allocator that calls a no-arg constructor on the given class.
      Parameters:
      clazz - The class on which to call the default constructor to allocate
    • setRubyClassAllocator

      public void setRubyClassAllocator(Class<? extends IRubyObject> clazz)
      Set a reflective allocator that calls the "standard" Ruby object constructor (Ruby, RubyClass) on the given class.
      Parameters:
      clazz - The class from which to grab a standard Ruby constructor
    • setRubyStaticAllocator

      public void setRubyStaticAllocator(Class<?> clazz)
      Set a reflective allocator that calls the "standard" Ruby object constructor (Ruby, RubyClass) on the given class via a static __allocate__ method intermediate.
      Parameters:
      clazz - The class from which to grab a standard Ruby __allocate__ method.

      Note: Used with `jrubyc --java` generated (interoperability) class files.

      Note: Used with new concrete extension.

    • allocate

      @Deprecated(since="10.0.0.0") public IRubyObject allocate()
      Deprecated.
    • allocate

      public IRubyObject allocate(ThreadContext context)
    • getBaseCallSite

      public CallSite getBaseCallSite(int idx)
    • getBaseCallSites

      public CallSite[] getBaseCallSites()
    • getExtraCallSites

      public CallSite[] getExtraCallSites()
    • getVariableTableManager

      public VariableTableManager getVariableTableManager()
    • hasObjectID

      public boolean hasObjectID()
    • getVariableAccessorsForRead

      public Map<String,VariableAccessor> getVariableAccessorsForRead()
    • getVariableAccessorForWrite

      public VariableAccessor getVariableAccessorForWrite(String name)
    • getVariableAccessorForRead

      public VariableAccessor getVariableAccessorForRead(String name)
    • getFFIHandleAccessorForRead

      public VariableAccessor getFFIHandleAccessorForRead()
    • getFFIHandleAccessorForWrite

      public VariableAccessor getFFIHandleAccessorForWrite()
    • getObjectGroupAccessorForRead

      public VariableAccessor getObjectGroupAccessorForRead()
    • getObjectGroupAccessorForWrite

      public VariableAccessor getObjectGroupAccessorForWrite()
    • getVariableTableSize

      public int getVariableTableSize()
    • getVariableTableSizeWithExtras

      public int getVariableTableSizeWithExtras()
    • getVariableNames

      public String[] getVariableNames()
      Get an array of all the known instance variable names. The offset into the array indicates the offset of the variable's value in the per-object variable array.
      Returns:
      a copy of the array of known instance variable names
    • getVariableTableCopy

      public Map<String,VariableAccessor> getVariableTableCopy()
    • getNativeClassIndex

      public ClassIndex getNativeClassIndex()
      Description copied from class: RubyObject
      This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. Will generally return a value from org.jruby.runtime.ClassIndex
      Specified by:
      getNativeClassIndex in interface CoreObjectType
      Overrides:
      getNativeClassIndex in class RubyModule
      Returns:
      the ClassIndex of the native type this object was constructed from
      See Also:
    • isModule

      public boolean isModule()
      Description copied from class: RubyBasicObject
      Specifically polymorphic method that are meant to be overridden by modules to specify that they are modules in an easy way.
      Specified by:
      isModule in interface IRubyObject
      Overrides:
      isModule in class RubyModule
      Returns:
      true if an object is Ruby Module instance (note that it will return false for Ruby Classes).
    • isClass

      public boolean isClass()
      Description copied from class: RubyBasicObject
      Specifically polymorphic method that are meant to be overridden by classes to specify that they are classes in an easy way.
      Specified by:
      isClass in interface IRubyObject
      Overrides:
      isClass in class RubyModule
      Returns:
      true if an object is Ruby Class instance (note that it will return false for Ruby singleton classes).
    • isSingleton

      public boolean isSingleton()
      Overrides:
      isSingleton in class RubyModule
    • createBootstrapClass

      public static RubyClass createBootstrapClass(Ruby runtime, String name, RubyClass superClass, ObjectAllocator allocator)
      boot_defclass Create an initial Object meta class before Module and Kernel dependencies have squirreled themselves together.
      Parameters:
      runtime - we need it
      Returns:
      a half-baked meta class for object
    • newClass

      @Deprecated(since="10.0.0.0") public static RubyClass newClass(Ruby runtime, RubyClass superClass)
      Deprecated.
      Construct a new class with the given name scoped under Object (global) and with Object as its immediate superclass. Corresponds to rb_class_new in MRI.
    • newClass

      @Deprecated(since="10.0.0.0") public static RubyClass newClass(Ruby runtime, RubyClass superClass, CallSite[] extraCallSites)
      Deprecated.
    • newClass

      public static RubyClass newClass(ThreadContext context, RubyClass superClass, CallSite[] extraCallSites)
      A variation on newClass that allow passing in an array of supplementary call sites to improve dynamic invocation.
    • newClass

      @Deprecated(since="10.0.0.0") public static RubyClass newClass(Ruby runtime, RubyClass superClass, String name, ObjectAllocator allocator, RubyModule parent, boolean setParent)
      Deprecated.
      Construct a new class with the given name, allocator, parent class, and containing class. If setParent is true, the class's parent will be explicitly set to the provided parent (rather than the new class just being assigned to a constant in that parent). Corresponds to rb_class_new/rb_define_class_id/rb_name_class/rb_set_class_path in MRI.
    • newClass

      @Deprecated(since="10.0.0.0") public static RubyClass newClass(Ruby runtime, RubyClass superClass, String name, ObjectAllocator allocator, RubyModule parent, boolean setParent, String file, int line)
      Deprecated.
    • newClass

      public static RubyClass newClass(ThreadContext context, RubyClass superClass, String name, ObjectAllocator allocator, RubyModule parent, boolean setParent, String file, int line)
    • newClass

      @Deprecated(since="10.0.0.0") public static RubyClass newClass(Ruby runtime, RubyClass superClass, String name, ObjectAllocator allocator, RubyModule parent, boolean setParent, CallSite[] extraCallSites)
      Deprecated.
    • newClass

      public static RubyClass newClass(ThreadContext context, RubyClass superClass, String name, ObjectAllocator allocator, RubyModule parent, boolean setParent, CallSite[] extraCallSites)
      A variation on newClass that allows passing in an array of supplementary call sites to improve dynamic invocation performance.
    • newClassBootstrap

      public static RubyClass newClassBootstrap(Ruby runtime, RubyClass Object, RubyClass Class, String name)
      This is an internal API for bootstrapping a few classes before ThreadContext is available. The API is intentionally limited/obtuse so no one is tempted to try and use it.
      Parameters:
      runtime - the runtime
      Object - reference to Object which is superclass and parent for new type
      name - the name of the new class
      Returns:
      the new class.
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name, Block block)
    • finvokeWithRefinements

      public IRubyObject finvokeWithRefinements(ThreadContext context, IRubyObject self, StaticScope staticScope, String name, Block block)
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name, IRubyObject[] args, Block block)
    • finvokeWithRefinements

      public IRubyObject finvokeWithRefinements(ThreadContext context, IRubyObject self, StaticScope staticScope, String name, IRubyObject[] args, Block block)
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg, Block block)
    • finvokeWithRefinements

      public IRubyObject finvokeWithRefinements(ThreadContext context, IRubyObject self, StaticScope staticScope, String name, IRubyObject arg, Block block)
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, Block block)
    • finvokeWithRefinements

      public IRubyObject finvokeWithRefinements(ThreadContext context, IRubyObject self, StaticScope staticScope, String name, IRubyObject arg0, IRubyObject arg1, Block block)
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
    • finvokeWithRefinements

      public IRubyObject finvokeWithRefinements(ThreadContext context, IRubyObject self, StaticScope staticScope, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name)
    • invokePublic

      public IRubyObject invokePublic(ThreadContext context, IRubyObject self, String name, IRubyObject arg)
      MRI: rb_funcallv_public
    • finvokeChecked

      public final IRubyObject finvokeChecked(ThreadContext context, IRubyObject self, String name)
      Safely attempt to invoke the given method name on self, using respond_to? and method_missing as appropriate. Return null if the method does not exist. MRI: rb_check_funcall
    • finvokeChecked

      public final IRubyObject finvokeChecked(ThreadContext context, IRubyObject self, JavaSites.CheckedSites sites)
      Safely attempt to invoke the given method name on self, using respond_to? and method_missing as appropriate. Return null if the method does not exist. MRI: rb_check_funcall
    • finvokeChecked

      public final IRubyObject finvokeChecked(ThreadContext context, IRubyObject self, String name, IRubyObject... args)
      Safely attempt to invoke the given method name on self, using respond_to? and method_missing as appropriate. Return null if the method does not exist. MRI: rb_check_funcall
    • finvokeChecked

      public final IRubyObject finvokeChecked(ThreadContext context, IRubyObject self, JavaSites.CheckedSites sites, IRubyObject... args)
      Safely attempt to invoke the given method name on self, using respond_to? and method_missing as appropriate. Return null if the method does not exist. MRI: rb_check_funcall
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name, IRubyObject[] args)
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg)
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1)
    • finvoke

      public IRubyObject finvoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
    • checkMethodBasicDefinition

      public boolean checkMethodBasicDefinition(String name)
    • invokeInherited

      public IRubyObject invokeInherited(ThreadContext context, IRubyObject self, IRubyObject subclass)
    • newInstance

      public IRubyObject newInstance(ThreadContext context, Block block)
      rb_class_new_instance
    • newInstance

      public IRubyObject newInstance(ThreadContext context, IRubyObject arg0, Block block)
    • newInstance

      public IRubyObject newInstance(ThreadContext context, IRubyObject arg0)
    • newInstance

      public IRubyObject newInstance(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
    • newInstance

      public IRubyObject newInstance(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
    • newInstance

      public IRubyObject newInstance(ThreadContext context, IRubyObject[] args, Block block)
    • initialize

      public IRubyObject initialize(ThreadContext context, Block block)
      rb_class_initialize
      Overrides:
      initialize in class RubyModule
    • initialize

      public IRubyObject initialize(ThreadContext context, IRubyObject superObject, Block block)
    • initializeCopiedModule

      public IRubyObject initializeCopiedModule(ThreadContext context, IRubyObject original)
      Overrides:
      initializeCopiedModule in class RubyModule
    • subclasses

      public IRubyObject subclasses(ThreadContext context)
    • subclasses

      public final Collection<RubyClass> subclasses()
    • subclasses

      public Collection<RubyClass> subclasses(boolean includeDescendants)
    • getSubclassesForRead

      public org.jruby.RubyClass.RubyClassSet getSubclassesForRead()
    • addSubclass

      public void addSubclass(RubyClass subclass)
      Add a new subclass to the weak set of subclasses. This version always constructs a new set to avoid having to synchronize against the set when iterating it for invalidation in invalidateCacheDescendants.
      Parameters:
      subclass - The subclass to add
    • removeSubclass

      public void removeSubclass(RubyClass subclass)
      Remove a subclass from the weak set of subclasses.
      Parameters:
      subclass - The subclass to remove
    • replaceSubclass

      public void replaceSubclass(RubyClass subclass, RubyClass newSubclass)
      Replace an existing subclass with a new one.
      Parameters:
      subclass - The subclass to remove
      newSubclass - The subclass to replace it with
    • becomeSynchronized

      public void becomeSynchronized()
      make this class and all subclasses sync
      Overrides:
      becomeSynchronized in class RubyModule
    • invalidateCacheDescendants

      public void invalidateCacheDescendants(ThreadContext context)
      Invalidate all subclasses of this class by walking the set of all subclasses and asking them to invalidate themselves. Note that this version works against a reference to the current set of subclasses, which could be replaced by the time this iteration is complete. In theory, there may be a path by which invalidation would miss a class added during the invalidation process, but the exposure is minimal if it exists at all. The only way to prevent it would be to synchronize both invalidation and subclass set modification against a global lock, which we would like to avoid.
      Overrides:
      invalidateCacheDescendants in class RubyModule
    • getClassRuntime

      public final Ruby getClassRuntime()
    • getRealClass

      public final RubyClass getRealClass()
      Get the "real" class, either the current one or the nearest ancestor that is not a singleton or include wrapper.
      Returns:
      the nearest non-singleton non-include class
    • getRealModule

      public RubyModule getRealModule()
      Equivalent to getRealClass().
      Overrides:
      getRealModule in class RubyModule
      Returns:
      the nearest non-singleton non-include class
    • inherited

      public IRubyObject inherited(ThreadContext context, IRubyObject arg)
    • inherit

      @Deprecated(since="10.0.0.0") public void inherit(RubyClass superClazz)
      Deprecated.
      rb_class_inherited (reversed semantics!)
    • superclass

      public IRubyObject superclass(ThreadContext context)
      Return the real super class of this class. rb_class_superclass
    • attached_object

      public IRubyObject attached_object(ThreadContext context)
    • checkInheritable

      @Deprecated(since="10.0.0.0") public static void checkInheritable(IRubyObject superClass)
      Deprecated.
      rb_check_inheritable
    • checkInheritable

      public static void checkInheritable(ThreadContext context, IRubyObject superClass)
    • getMarshal

      public final ObjectMarshal getMarshal()
    • setMarshal

      @Deprecated(since="10.0.0.0") public final void setMarshal(ObjectMarshal marshal)
      Deprecated.
      Parameters:
      marshal -
    • marshal

      @Deprecated(since="10.0.0.0", forRemoval=true) public final void marshal(Object obj, MarshalStream marshalStream) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • marshal

      public final void marshal(ThreadContext context, RubyOutputStream out, Object obj, MarshalDumper marshalStream)
    • unmarshal

      @Deprecated(since="10.0.0.0", forRemoval=true) public final Object unmarshal(UnmarshalStream unmarshalStream) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • unmarshal

      public final Object unmarshal(ThreadContext context, RubyInputStream in, MarshalLoader loader)
    • marshalTo

      @Deprecated(since="10.0.0.0", forRemoval=true) public static void marshalTo(RubyClass clazz, MarshalStream output) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • marshalTo

      public static void marshalTo(ThreadContext context, RubyOutputStream out, RubyClass clazz, MarshalDumper output)
    • unmarshalFrom

      @Deprecated(since="10.0.0.0", forRemoval=true) public static RubyClass unmarshalFrom(UnmarshalStream input) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • unmarshalFrom

      public static RubyClass unmarshalFrom(ThreadContext context, RubyInputStream in, MarshalLoader input)
    • isReifiable

      public boolean isReifiable(boolean[] java)
      Whether this class can be reified into a Java class. Currently only objects that descend from Object (or descend from Ruby-based classes that descend from Object) can be reified.
      Parameters:
      java - If reified from java (out param)
      Returns:
      true if the class can be reified, false otherwise. The out param indicate if it is java concrete reification
    • reifyWithAncestors

      public void reifyWithAncestors()
    • reifyWithAncestors

      public void reifyWithAncestors(String classDumpDir)
    • reifyWithAncestors

      public void reifyWithAncestors(boolean useChildLoader)
    • reifyWithAncestors

      public void reifyWithAncestors(String classDumpDir, boolean useChildLoader)
      Reify this class, first reifying all its ancestors. This causes the reified class and all ancestors' reified classes to come into existence, so any future changes will not be reflected. This form also accepts a string argument indicating a path in which to dump the intermediate reified class bytes.
      Parameters:
      classDumpDir - the path in which to dump reified class bytes
      useChildLoader - whether to load the class into its own child classloader
    • reify

      public final void reify()
    • reify

      public final void reify(String classDumpDir)
    • reify

      public final void reify(boolean useChildLoader)
    • reify

      public void reify(String classDumpDir, boolean useChildLoader)
      Stand up a real Java class for the backing store of this object
      Parameters:
      classDumpDir - Directory to save reified java class
    • getPositionOrDefault

      public PositionAware getPositionOrDefault(DynamicMethod method)
    • setReifiedClass

      @Deprecated(since="10.0.0.0") public void setReifiedClass(Class<? extends IRubyObject> reifiedClass)
      Deprecated.
      Use reifiedClass(Class) instead.
      Parameters:
      reifiedClass -
    • getReifiedClass

      @Deprecated(since="10.0.0.0") public Class<? extends Reified> getReifiedClass()
      Deprecated.
      Use reifiedClass() instead.
      Returns:
    • reifiedClass

      public Class<? extends Reified> reifiedClass()
      Gets a reified Ruby or Java class. To ensure a specific type, see getReifiedRubyClass() or getReifiedJavaClass()
    • getReifiedRubyClass

      public Class<? extends IRubyObject> getReifiedRubyClass()
      Gets a reified Ruby class. Throws if this is a Java class
    • getReifiedJavaClass

      public Class<? extends ReifiedJavaProxy> getReifiedJavaClass()
      Gets a reified Java class. Throws if this is a Ruby class
    • getIsReifiedExtendedJavaClass

      public Boolean getIsReifiedExtendedJavaClass()
      If the current class is reified (null otherwise) and if it extends java
      Returns:
      Null if not reified, true if a concrete extension class, and false if a ruby class
    • nearestReifiedClass

      public static Class<?> nearestReifiedClass(RubyClass klass)
    • getParameterAnnotations

      public Map<String,List<Map<Class<?>,Map<String,Object>>>> getParameterAnnotations()
    • addParameterAnnotation

      public void addParameterAnnotation(String method, int i, Class<?> annoClass, Map<String,Object> value)
    • getMethodAnnotations

      public Map<String,Map<Class<?>,Map<String,Object>>> getMethodAnnotations()
    • getFieldAnnotations

      public Map<String,Map<Class<?>,Map<String,Object>>> getFieldAnnotations()
    • addMethodAnnotation

      public void addMethodAnnotation(String methodName, Class<?> annotation, Map fields)
    • addFieldAnnotation

      public void addFieldAnnotation(String fieldName, Class<?> annotation, Map fields)
    • getMethodSignatures

      public Map<String,Class<?>[]> getMethodSignatures()
    • getAllMethodSignatures

      public Map<String,List<Class<?>[]>> getAllMethodSignatures()
    • getFieldSignatures

      public Map<String,Class<?>> getFieldSignatures()
    • addMethodSignature

      public void addMethodSignature(String methodName, Class<?>[] types)
    • addFieldSignature

      public void addFieldSignature(String fieldName, Class<?> type)
    • getClassAnnotations

      public Map<Class<?>,Map<String,Object>> getClassAnnotations()
    • addClassAnnotation

      public void addClassAnnotation(Class<?> annotation, Map fields)
    • getClassConfig

      public JavaClassConfiguration getClassConfig()
    • setClassConfig

      public void setClassConfig(JavaClassConfiguration jcc)
    • toJava

      public <T> T toJava(Class<T> target)
      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 RubyModule
      Type Parameters:
      T - type
      Parameters:
      target - The target type to which the object should be converted.
      Returns:
      java type
      See Also:
    • smartDump

      @Deprecated(since="10.0.0.0", forRemoval=true) public void smartDump(MarshalStream stream, IRubyObject target) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Marshal the given object to the marshaling stream, being "smart" and caching how to do that marshaling. If the class defines a custom "respond_to?" method, then the behavior of dumping could vary without our class structure knowing it. As a result, we do only the slow-path classic behavior. If the class defines a real "marshal_dump" method, we cache and use that. If the class defines a real "_dump" method, we cache and use that. If the class neither defines none of the above methods, we use a fast path directly to the default dumping logic.
      Parameters:
      stream - The stream to which to marshal the data
      target - The object whose data should be marshaled
      Throws:
      IOException - If there is an IO exception while writing to the stream.
    • smartDump

      public void smartDump(ThreadContext context, RubyOutputStream out, MarshalDumper stream, IRubyObject target)
    • smartLoadNewUser

      public IRubyObject smartLoadNewUser(IRubyObject target, IRubyObject data)
      Load marshaled data into a blank target object using marshal_load, being "smart" and caching the mechanism for invoking marshal_load. If the class implements a custom respond_to?, cache nothing and go slow path invocation of respond_to? and marshal_load every time. Raise error if respond_to? :marshal_load returns true and no :marshal_load is defined. If the class implements marshal_load, cache and use that. Otherwise, error, since marshal_load is not present.
      Parameters:
      target - The blank target object into which marshal_load will deserialize the given data
      data - The marshaled data
      Returns:
      The fully-populated target object
    • smartLoadOldUser

      public IRubyObject smartLoadOldUser(IRubyObject data)
      Load marshaled data into a blank target object using _load, being "smart" and caching the mechanism for invoking _load. If the metaclass implements custom respond_to?, cache nothing and go slow path invocation of respond_to? and _load every time. Raise error if respond_to? :_load returns true and no :_load is defined. If the metaclass implements _load, cache and use that. Otherwise, error, since _load is not present.
      Parameters:
      data - The marshaled data, to be reconstituted into an object by _load
      Returns:
      The fully-populated target object
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, CallType callType, Block block)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, IRubyObject[] args, CallType callType, Block block)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg, CallType callType, Block block)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, CallType callType, Block block)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, CallType callType, Block block)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, CallType callType)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, IRubyObject[] args, CallType callType)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg, CallType callType)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, CallType callType)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • invoke

      @Deprecated(since="9.4-") public IRubyObject invoke(ThreadContext context, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, CallType callType)
      Deprecated.
      Use finvoke if you do not want visibility-checking or invokeFrom if you do.
      This method is deprecated because it depends on having a Ruby frame pushed for checking method visibility, and there's no way to enforce that. Most users of this method probably don't need to check visibility. See https://github.com/jruby/jruby/issues/4134
    • getObjectIdAccessorField

      @Deprecated(since="9.4-") public VariableAccessorField getObjectIdAccessorField()
      Deprecated.
    • getFFIHandleAccessorField

      @Deprecated(since="9.4-") public VariableAccessorField getFFIHandleAccessorField()
      Deprecated.
    • getObjectGroupAccessorField

      @Deprecated(since="9.4-") public VariableAccessorField getObjectGroupAccessorField()
      Deprecated.