gnu.mapping
Class LocationProc

java.lang.Object
  extended by gnu.mapping.PropertySet
      extended by gnu.mapping.Procedure
          extended by gnu.mapping.Procedure0or1
              extended by gnu.mapping.LocationProc
All Implemented Interfaces:
HasSetter, Named

public class LocationProc
extends Procedure0or1
implements HasSetter

A Procedure that evaluates to the value of a Location. Calling it with one argument sets the value, for compatibility with the "parameter objects" of SRFI-39.


Constructor Summary
LocationProc(Location loc)
           
LocationProc(Location loc, Procedure converter)
           
 
Method Summary
 java.lang.Object apply0()
           
 java.lang.Object apply1(java.lang.Object value)
           
 Location getLocation()
           
 Procedure getSetter()
           
static LocationProc makeNamed(Symbol name, Location loc)
           
 void pushConverter(Procedure converter)
           
 void set0(java.lang.Object value)
          If HasSetter, the Procedure is called in the LHS of an assignment.
 java.lang.String toString()
           
 
Methods inherited from class gnu.mapping.Procedure0or1
apply2, apply3, apply4, applyN, numArgs
 
Methods inherited from class gnu.mapping.Procedure
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, set1, setN, setSetter, setSourceLocation
 
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocationProc

public LocationProc(Location loc)

LocationProc

public LocationProc(Location loc,
                    Procedure converter)
Method Detail

makeNamed

public static LocationProc makeNamed(Symbol name,
                                     Location loc)

pushConverter

public void pushConverter(Procedure converter)

apply0

public java.lang.Object apply0()
                        throws java.lang.Throwable
Specified by:
apply0 in class Procedure0or1
Throws:
java.lang.Throwable

apply1

public java.lang.Object apply1(java.lang.Object value)
                        throws java.lang.Throwable
Specified by:
apply1 in class Procedure0or1
Throws:
java.lang.Throwable

set0

public void set0(java.lang.Object value)
          throws java.lang.Throwable
Description copied from class: Procedure
If HasSetter, the Procedure is called in the LHS of an assignment.

Overrides:
set0 in class Procedure
Throws:
java.lang.Throwable

getSetter

public Procedure getSetter()
Specified by:
getSetter in interface HasSetter
Overrides:
getSetter in class Procedure

getLocation

public final Location getLocation()

toString

public java.lang.String toString()
Overrides:
toString in class Procedure