jfun.jaskell
Interface LocationAware


public interface LocationAware

Client who's interested in each expression's location in the source should implement this interface to get notified about the location of each evaluated value.

Zephyr Business Solution

Author:
Ben Yu

Method Summary
 java.lang.Object informLocation(java.lang.Object obj, Location loc)
          Transform an evaluated object to an object that has the location information recorded somewhere.
 

Method Detail

informLocation

public java.lang.Object informLocation(java.lang.Object obj,
                                       Location loc)
Transform an evaluated object to an object that has the location information recorded somewhere.

Client can either create a new object that has the location info, or use some setter methods to set the location.

Parameters:
obj - the evaluated result.
loc - the location of the expression that evaluates to this result.
Returns:
the object that's aware of the location info.