lib/core/src/main/ruby/jruby/java/core_ext/module.rb
##
# Includes a Java package into this class/module. The Java classes in the
# package will become available in this class/module, unless a constant
# with the same name as a Java class is already defined.
#
Includes a Java package into this class/module. The Java classes in the
package will become available in this class/module, unless a constant
with the same name as a Java class is already defined.
Includes a Java package into this class / module . The Java classes in the package will become available in this class / module unless a constant with the same name as a Java class is already defined .
def include_package(package)
    hidden_methods = {
      included_packages: lambda do |m|
        return [] unless m.respond_to?(:instance_variable_get)
        m.instance_variable_set(:@included_packages, []) unless m.instance_variable_get(:@included_packages)
        m.instance_variable_get(:@included_packages)
      end,
    }
    package = package.package_name if package.respond_to?(:package_name)
    the_included_packages = hidden_methods[:included_packages].call(self)
    the_included_packages << package unless the_included_packages.include?(package)
    nil
  end
def include_package ( package ) hidden_methods = { included_packages : lambda do | m | return [ ] unless m . respond_to? ( :instance_variable_get ) m . instance_variable_set ( :@included_packages , [ ] ) unless m . instance_variable_get ( :@included_packages ) m . instance_variable_get ( :@included_packages ) end , } package = package . package_name if package . respond_to? ( :package_name ) the_included_packages = hidden_methods [ :included_packages ] . call ( self ) the_included_packages << package unless the_included_packages . include? ( package ) nil end
Includes a Java package into this class/module.
Includes a Java package into this class / module .
package
<not_specific>