org.erights.e.elib.base
Interface Callable

All Superinterfaces:
Amplifiable
All Known Implementing Classes:
EImpl, Ref, StaticMaker

public interface Callable
extends Amplifiable

Untamed: Objects that handle E messages themselves.

Author:
Mark S. Miller

Method Summary
 Object callAll(String verb, Object[] args)
          Suppressed: must ensure this call gets backtrace'd
 TypeDesc getAllegedType()
          Suppressed: Returns a description of the type the object alleges to implement.
 Script optShorten(String verb, Object[] args)
          Suppressed: Returns null or a Script that can be execute()d, having the same effect as a callAll() on this object.
 boolean respondsTo(String verb, int arity)
          Suppressed: Does the object respond to verb/arity?
 
Methods inherited from interface org.erights.e.elib.sealing.Amplifiable
optSealedDispatch
 

Method Detail

optShorten

public Script optShorten(String verb,
                         Object[] args)
Suppressed: Returns null or a Script that can be execute()d, having the same effect as a callAll() on this object.

If the Script isn't "shorter", ie, if it doesn't represent a shortened implementation path to the actual execution, then optShorten should return null instead, in order to avoid an infinite regress with CallableScript. In addition, it is always correct for optShorten() to return null.


callAll

public Object callAll(String verb,
                      Object[] args)
Suppressed: must ensure this call gets backtrace'd


getAllegedType

public TypeDesc getAllegedType()
Suppressed: Returns a description of the type the object alleges to implement. Should probably be moved to the optSealedDispatch.


respondsTo

public boolean respondsTo(String verb,
                          int arity)
Suppressed: Does the object respond to verb/arity?



comments?