Class PackageLoader

All Implemented Interfaces:
Loader, Uncaller

class PackageLoader
extends BaseLoader

The subtree of a Loader under a package-prefix.

As explained in the superclass comment, this must be thread-safe.

Mark S. Miller

Field Summary
private  String myPrefix
private  String myProtocol
private  Loader mySubstrate
          Inductively thread-safe.
Constructor Summary
(package private) PackageLoader(Loader substrate, String protocol, String fqName)
Method Summary
 Object get(String name)
          Enabled: How modules (and other things) get imported.
 Object[] optUncall(Object obj)
          See org.erights.e.elib.serial.BaseLoader#getOptWrappingUncall.
 String toString()
          Suppressed: Returns a string representation of the object.
Methods inherited from class org.erights.e.elib.serial.BaseLoader
getOptWrappingUncall, optUnget, ungetToUncall
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


private final Loader mySubstrate
Inductively thread-safe.


private final String myProtocol


private final String myPrefix
Constructor Detail


PackageLoader(Loader substrate,
              String protocol,
              String fqName)
Method Detail


public Object get(String name)
Description copied from interface: Loader
Enabled: How modules (and other things) get imported.

If this loader is called 'foo__uriGetter', then '' will expand to 'foo__uriGetter.get("name")'.


public Object[] optUncall(Object obj)
See org.erights.e.elib.serial.BaseLoader#getOptWrappingUncall.

:nullOk([any, String, any[]]); either null or a 3-element list of
  • a receiver object whose reconstruction would receive the message
  • a String, which is the name of the message to call
  • a list of arguments, whose reconstruction are the actual arguments to the call.


public String toString()
Description copied from class: Object
Suppressed: Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())

toString in class Object
a string representation of the object.