Class JavaPackage.BlankSlateWrapper

All Implemented Interfaces:
Serializable, Cloneable, Comparable<IRubyObject>, InstanceVariables, InternalVariables, IRubyObject, CoreObjectType
Enclosing class:
JavaPackage

static final class JavaPackage.BlankSlateWrapper extends IncludedModuleWrapper
This special module wrapper is used by the Java "package modules" in order to simulate a blank slate. Only a certain subset of method names will carry through to searching the superclass, with all others returning null and triggering the method_missing call needed to handle lazy Java package discovery. Because this is in the hierarchy, it does mean any methods that are not Java packages or otherwise defined on the Java::JavaPackage will be inaccessible.
  • Constructor Details

  • Method Details

    • searchMethodCommon

      protected DynamicMethod searchMethodCommon(String id)
      Overrides:
      searchMethodCommon in class RubyModule
    • handlesMethod

      private static String handlesMethod(String name)
    • addSubclass

      public void addSubclass(RubyClass subclass)
      Description copied from class: RubyClass
      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.
      Overrides:
      addSubclass in class RubyClass
      Parameters:
      subclass - The subclass to add