daikon.split.misc
Class CallerContextSplitter

Object
  extended by Splitter
      extended by CallerContextSplitter
All Implemented Interfaces:
Serializable

public final class CallerContextSplitter
extends Splitter

This splitter tests the condition "$caller one of < some set of integers >".

See Also:
Serialized Form

Field Summary
 String CALLER_INDICATOR_NAME_STRING
          Name of the variable used by the front end to store caller (callsite) information.
 
Fields inherited from class Splitter
instantiated
 
Constructor Summary
  CallerContextSplitter(long[] ids, String condition)
          Create a prototype splitter for the given set of ids and condition.
protected CallerContextSplitter(Ppt ppt, long[] ids, String condition)
           
 
Method Summary
 String condition()
          Returns the condition being tested, as a String.
 DummyInvariant getDummyInvariant()
          On an instantiated Splitter, give back an appropriate instantiated DummyInvariant.
 Splitter instantiate(Ppt ppt)
          Create a new splitter for the given ppt using this as a prototype.
 boolean test(ValueTuple vt)
          Returns true or false according to whether the values in the specified ValueTuple satisfy the condition represented by this Splitter.
 String toString()
           
 boolean valid()
          Returns true or false according to whether this was instantiated correctly and test(ValueTuple) can be called without error.
 
Methods inherited from class Splitter
instantiated, instantiateDummy, makeDummyInvariant
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CALLER_INDICATOR_NAME_STRING

public final String CALLER_INDICATOR_NAME_STRING
Name of the variable used by the front end to store caller (callsite) information.

See Also:
Constant Field Values
Constructor Detail

CallerContextSplitter

protected CallerContextSplitter(Ppt ppt,
                                long[] ids,
                                String condition)

CallerContextSplitter

public CallerContextSplitter(long[] ids,
                             String condition)
Create a prototype splitter for the given set of ids and condition.

Method Detail

instantiate

public Splitter instantiate(Ppt ppt)
Create a new splitter for the given ppt using this as a prototype.

Specified by:
instantiate in class Splitter

valid

public boolean valid()
Description copied from class: Splitter
Returns true or false according to whether this was instantiated correctly and test(ValueTuple) can be called without error. An alternate design would have instantiate(Ppt) check this, but it's a bit easier on implementers of subclasses of Splitter for the work to be done (in just one place) by the caller.

Specified by:
valid in class Splitter

test

public boolean test(ValueTuple vt)
Description copied from class: Splitter
Returns true or false according to whether the values in the specified ValueTuple satisfy the condition represented by this Splitter.

Specified by:
test in class Splitter

condition

public String condition()
Description copied from class: Splitter
Returns the condition being tested, as a String.

Specified by:
condition in class Splitter

toString

public String toString()
Overrides:
toString in class Object

getDummyInvariant

public DummyInvariant getDummyInvariant()
Description copied from class: Splitter
On an instantiated Splitter, give back an appropriate instantiated DummyInvariant.

Specified by:
getDummyInvariant in class Splitter