dk.brics.string.external
Class FieldResolution

java.lang.Object
  extended by dk.brics.string.external.FieldResolution

public class FieldResolution
extends Object

Description of a non-application String field.

It is allowed for the same field to yield different resolutions at various program points. Because only immutable fields can be resolved, it is legal to change the field in non-application code, as long as all resolutions of the field remain valid at each reference to that field.

Note that it is better for a resolver to return null instead of creating a field resolution accepting any string, since another resolver might produce a more accurate answer. The outcomes of an unresolved field, and the any string resolution, are identical.

Author:
Asger

Constructor Summary
FieldResolution(Automaton automaton)
          Creates a field resolution specifying the possible values of the field, at the place it was read.
 
Method Summary
 Automaton getAutomaton()
          Returns an automaton accepting all the possible values of the field, at the place it was read.
 void setAutomaton(Automaton automaton)
          Sets the automaton accepting all the possible values of the field, at the place it was read.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldResolution

public FieldResolution(Automaton automaton)
Creates a field resolution specifying the possible values of the field, at the place it was read.

Parameters:
automaton - automaton accepting all possible values of the field.
Method Detail

getAutomaton

public Automaton getAutomaton()
Returns an automaton accepting all the possible values of the field, at the place it was read.

Returns:
an automaton; never null.

setAutomaton

public void setAutomaton(Automaton automaton)
Sets the automaton accepting all the possible values of the field, at the place it was read.

Parameters:
automaton - an automaton. Must not be null.


Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.