edu.neu.ccs.demeter.dj
Class Strategy

java.lang.Object
  |
  +--edu.neu.ccs.demeter.aplib.sg.Strategy
        |
        +--edu.neu.ccs.demeter.dj.Strategy
All Implemented Interfaces:
StrategyI

public class Strategy
extends Strategy

A strategy determining a set of paths through a class graph or a slice of an object graph.


Constructor Summary
Strategy(Reader in)
          Parse a strategy expression from a char stream.
Strategy(Reader in, Map env)
          Parse a strategy expression from a char stream.
Strategy(String s)
          Parse a strategy expression from a string.
Strategy(String s, Map env)
          Parse a strategy expression from a string.
 
Method Summary
 Set getSourceNames()
          An unmodifiable set of symbolic names that the source nodes in the strategy graph map to, or null if the strategy can start at any class graph node.
 Set getTargetNames()
          An unmodifiable set of symbolic names that the target nodes in the strategy graph map to, or null if the strategy can finish at any class graph node.
static String getVersion()
          The DJ version string.
 boolean isSimpleStrategy()
           
 boolean isStrategyCombination()
           
 SimpleStrategyI toSimpleStrategy()
           
 StrategyCombinationI toStrategyCombination()
           
 String toString()
           
 
Methods inherited from class edu.neu.ccs.demeter.aplib.sg.Strategy
__trav_attachEnv, clone, fromString, fromString, readFrom, readFrom, readFrom, readFrom
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Strategy

public Strategy(Reader in)
         throws StrategyParseException
Parse a strategy expression from a char stream.


Strategy

public Strategy(String s)
         throws StrategyParseException
Parse a strategy expression from a string.


Strategy

public Strategy(Reader in,
                Map env)
         throws StrategyParseException
Parse a strategy expression from a char stream. Strategy references are resolved by looking them up in the provided environent.


Strategy

public Strategy(String s,
                Map env)
         throws StrategyParseException
Parse a strategy expression from a string. Strategy references are resolved by looking them up in the provided environent.

Method Detail

getVersion

public static String getVersion()
The DJ version string.


isSimpleStrategy

public boolean isSimpleStrategy()
Specified by:
isSimpleStrategy in interface StrategyI
Overrides:
isSimpleStrategy in class Strategy

toSimpleStrategy

public SimpleStrategyI toSimpleStrategy()
Specified by:
toSimpleStrategy in interface StrategyI
Overrides:
toSimpleStrategy in class Strategy

isStrategyCombination

public boolean isStrategyCombination()
Specified by:
isStrategyCombination in interface StrategyI
Overrides:
isStrategyCombination in class Strategy

toStrategyCombination

public StrategyCombinationI toStrategyCombination()
Specified by:
toStrategyCombination in interface StrategyI
Overrides:
toStrategyCombination in class Strategy

getSourceNames

public Set getSourceNames()
An unmodifiable set of symbolic names that the source nodes in the strategy graph map to, or null if the strategy can start at any class graph node.

Specified by:
getSourceNames in class Strategy

getTargetNames

public Set getTargetNames()
An unmodifiable set of symbolic names that the target nodes in the strategy graph map to, or null if the strategy can finish at any class graph node.

Specified by:
getTargetNames in class Strategy

toString

public String toString()
Overrides:
toString in class Object