orc.runtime.sites
Class DotSite

java.lang.Object
  extended by orc.runtime.values.Value
      extended by orc.runtime.sites.Site
          extended by orc.runtime.sites.EvalSite
              extended by orc.runtime.sites.DotSite
All Implemented Interfaces:
Callable, TraceableValue
Direct Known Subclasses:
Buffer.BufferInstance, Cell.CellInstance, Ref.RefInstance, SyncChannel.SyncChannelInstance

public abstract class DotSite
extends EvalSite
implements TraceableValue

Author:
dkitchin Dot-accessible sites should extend this class and declare their Orc-available methods using addMethods. The code is forward-compatible with many possible optimizations on the field lookup strategy.

Field Summary
 
Fields inherited from class orc.runtime.values.Value
futureNotReady
 
Constructor Summary
DotSite()
           
 
Method Summary
protected  void addMethod(java.lang.String f, java.lang.Object s)
           
protected abstract  void addMethods()
           
 java.lang.Object evaluate(Args args)
           
 Value marshal(Marshaller tracer)
           
 
Methods inherited from class orc.runtime.sites.EvalSite
callSite
 
Methods inherited from class orc.runtime.sites.Site
accept, createCall, type
 
Methods inherited from class orc.runtime.values.Value
forceArg, forceCall, isNone, isSome, signal, untag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotSite

public DotSite()
Method Detail

evaluate

public java.lang.Object evaluate(Args args)
                          throws TokenException
Specified by:
evaluate in class EvalSite
Throws:
TokenException

addMethods

protected abstract void addMethods()

addMethod

protected void addMethod(java.lang.String f,
                         java.lang.Object s)

marshal

public Value marshal(Marshaller tracer)
Specified by:
marshal in interface TraceableValue