def const_missing(sym)
      # Load the class definitions in the source directory, if necessary.
      # If a load is performed as a result of referencing the given symbol,
      # then dereference the class constant again after the load, since the class
      # might have been loaded or referenced during the load.
      unless defined? @introspected then
        configure_importer
        load_definitions
        return const_get(sym)
      end
      
      # Append the symbol to the package to make the Java class name.
      logger.debug { "Detecting whether #{sym} is a #{self} Java class..." }
      klass = @packages.detect_value do |pkg|
        begin
           java_import "#{pkg}.#{sym}"
        rescue NameError
          nil
        end
      end
      if klass then
        logger.debug { "Added #{klass} to the #{self} module." }
      else
        # Not a Java class; print a log message and pass along the error.
        logger.debug { "#{sym} is not recognized as a #{self} Java class." }
        super
      end
      
      # Introspect the Java class meta-data, if necessary.
      unless introspected?(klass) then
        add_metadata(klass)
        # Print the class meta-data.
        logger.info(klass.pp_s)
      end
      
      klass
    end
def const_missing(sym)
      # Load the class definitions in the source directory, if necessary.
      # If a load is performed as a result of referencing the given symbol,
      # then dereference the class constant again after the load, since the class
      # might have been loaded or referenced during the load.
      unless defined? @introspected then
        configure_importer
        load_definitions
        return const_get(sym)
      end
      
      # Append the symbol to the package to make the Java class name.
      logger.debug { "Detecting whether #{sym} is a #{self} Java class..." }
      klass = @packages.detect_value do |pkg|
        begin
           java_import "#{pkg}.#{sym}"
        rescue NameError
          nil
        end
      end
      if klass then
        logger.debug { "Added #{klass} to the #{self} module." }
      else
        # Not a Java class; print a log message and pass along the error.
        logger.debug { "#{sym} is not recognized as a #{self} Java class." }
        super
      end
      
      # Introspect the Java class meta-data, if necessary.
      unless introspected?(klass) then
        add_metadata(klass)
        # Print the class meta-data.
        logger.info(klass.pp_s)
      end
      
      klass
    end
Imports a Java class constant on demand. If the class does not already
 include this module's mixin, then the mixin is included in the class.

 @param [Symbol, String] sym the missing constant
 @return [Class] the imported class
 @raise [NameError] if the symbol is not an importable Java class