org.erights.e.meta.java.lang
Class InterfaceGuardSugar

java.lang.Object
  |
  +--org.erights.e.elib.slot.BaseGuard
        |
        +--org.erights.e.elib.slot.BaseAuditor
              |
              +--org.erights.e.elib.base.TypeDesc
                    |
                    +--org.erights.e.elib.base.ClassDesc
                          |
                          +--org.erights.e.meta.java.lang.InterfaceGuardSugar
All Implemented Interfaces:
Auditor, Guard, Marker, Persistent, Serializable, SlotGuard, ValueGuard

public class InterfaceGuardSugar
extends ClassDesc

Untamed: Callables (eg, objects defined in the E language) coerce to rubber-stamping (non-Marker) interfaces by deflection.

Author:
Mark S. Miller
See Also:
Deflector, Serialized Form

Field Summary
private  boolean myIsMarker
           
(package private) static long serialVersionUID
           
 
Fields inherited from class org.erights.e.elib.base.ClassDesc
 
Fields inherited from class org.erights.e.elib.base.TypeDesc
 
Fields inherited from class org.erights.e.elib.slot.BaseGuard
myOptValueGuard
 
Fields inherited from interface org.erights.e.elib.serial.Persistent
HONORARY, HONORED_NAMES
 
Constructor Summary
InterfaceGuardSugar(Class clazz)
          Enabled: @param clazz must represent an interface type
 
Method Summary
 boolean audit(Object script)
          Enabled: If I represent a non-Marker interface, then I'm a rubber stamping auditor and will approve anything.
 Object coerce(Object specimen, OneArgFunc optEjector)
          Enabled: Overridden to allow non-marker interfaces to deflect null and non-near references.
 Object subCoerce(Object specimen, OneArgFunc optEjector)
          Enabled:
 
Methods inherited from class org.erights.e.elib.base.ClassDesc
asClass, byJavaRules, flatName, flatSig, get, get, isFloating, isIntegral, make, sig, sig, simpleName, simpleSig
 
Methods inherited from class org.erights.e.elib.base.TypeDesc
getAuditors, getDocComment, getFQName, getMessageTypes, getName, prettyPrintOn, show, toString
 
Methods inherited from class org.erights.e.elib.slot.BaseGuard
__printOn, accepts, and, butNot, coerce, makeSlot, makeSlot, not, or, xor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID

myIsMarker

private final boolean myIsMarker
Constructor Detail

InterfaceGuardSugar

public InterfaceGuardSugar(Class clazz)
Enabled: @param clazz must represent an interface type

Method Detail

coerce

public Object coerce(Object specimen,
                     OneArgFunc optEjector)
Enabled: Overridden to allow non-marker interfaces to deflect null and non-near references.

Specified by:
coerce in interface ValueGuard
Overrides:
coerce in class ClassDesc

subCoerce

public Object subCoerce(Object specimen,
                        OneArgFunc optEjector)
Enabled:

Overrides:
subCoerce in class ClassDesc

audit

public boolean audit(Object script)
Enabled: If I represent a non-Marker interface, then I'm a rubber stamping auditor and will approve anything.

XXX Otherwise, I currently reject everything, but this must be fixed.

Specified by:
audit in interface Auditor
Overrides:
audit in class BaseAuditor


comments?