edu.ksu.cis.projects.bogor.module
Class DefaultTransformer
java.lang.Object
edu.ksu.cis.projects.bogor.module.DefaultTransformer
- All Implemented Interfaces:
- ISelfDescribingModule, IModule, ITransformer, Disposable
public class DefaultTransformer
- extends Object
- implements ITransformer, ISelfDescribingModule
- Version:
- CVS $Revision: 1.27 $ $Date: 2005/05/26 18:23:13 $
- Author:
- Robby , Matt Hoosier
Method Summary |
protected void |
addAll(ArrayList<IBacktrackingInfo> result,
IBacktrackingInfo[] bis)
|
IMessageStore |
connect(IBogorConfiguration bc)
Connects this modules to other modules. |
void |
dispose()
Remove references. |
String |
getCopyrightNotice()
Returns the copyright notice for this module. |
protected FSMSymbolTable |
getFSMSymbolTable(IState state,
int threadId)
|
Pair<Domain,Boolean> |
getOptionDomain(String id)
|
Collection<Triple<String,Boolean,OptionScope>> |
getOptionIds()
|
Collection<String> |
getSuggestedValues(String id,
IBogorConfiguration bc,
SymbolTable st)
|
protected ExceptionThrownBogorException |
resolveThrowable(BogorException mce)
|
IMessageStore |
setOptions(String key,
Properties configuration)
Sets the options for this module. |
void |
setSchedulingStrategyContext(ISchedulingStrategyContext ssc)
|
protected IBacktrackingInfo[] |
toArray(ArrayList<IBacktrackingInfo> backtrackingInfos)
|
IBacktrackingInfo[] |
transform(ISchedulingStrategyContext ssc,
BlockTransformation t,
Action a)
|
IBacktrackingInfo[] |
transform(ISchedulingStrategyContext ssc,
InvokeTransformation t,
boolean returned,
IValue returnValue)
|
IBacktrackingInfo[] |
transformEnter(InvokeTransformation t)
|
protected boolean |
transformException(Transformation t,
ArrayList<IBacktrackingInfo> result)
|
IBacktrackingInfo[] |
transformExit(InvokeTransformation t,
IValue returnValue)
|
protected IBacktrackingInfo[] |
transformNextState(NextState ns,
Transformation t)
|
void |
unsetSchedulingStrategyContext()
|
boolean |
validate(String id,
String value,
IBogorConfiguration bc,
SymbolTable st,
Collection<FileMessage> errors)
Checks whether the value of a configuration option is legal. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USE_LIVE_ID
protected static final String USE_LIVE_ID
- See Also:
- Constant Field Values
ARITHMETIC_EXCEPTION_ID
protected static final String ARITHMETIC_EXCEPTION_ID
- See Also:
- Constant Field Values
MONITOR_EXCEPTION_ID
protected static final String MONITOR_EXCEPTION_ID
- See Also:
- Constant Field Values
CAST_EXCEPTION_ID
protected static final String CAST_EXCEPTION_ID
- See Also:
- Constant Field Values
ARRAY_BOUNDS_EXCEPTION_ID
protected static final String ARRAY_BOUNDS_EXCEPTION_ID
- See Also:
- Constant Field Values
NULL_EXCEPTION_ID
protected static final String NULL_EXCEPTION_ID
- See Also:
- Constant Field Values
useLive
protected boolean useLive
arithmeticException
protected String arithmeticException
monitorException
protected String monitorException
castException
protected String castException
arrayBoundsException
protected String arrayBoundsException
nullException
protected String nullException
illFormedBogorModelException
protected String illFormedBogorModelException
tr
protected ITransformer tr
at
protected IActionTaker at
bif
protected IBacktrackingInfoFactory bif
ee
protected IExpEvaluator ee
ss
protected ISchedulingStrategist ss
vf
protected IValueFactory vf
symbolTable
protected SymbolTable symbolTable
ssc
protected ISchedulingStrategyContext ssc
DefaultTransformer
public DefaultTransformer()
getCopyrightNotice
public String getCopyrightNotice()
- Description copied from interface:
IModule
- Returns the copyright notice for this module.
- Specified by:
getCopyrightNotice
in interface IModule
- Returns:
- The copyright notice for this module.
Returns null if no additional notice is necessary.
setOptions
public IMessageStore setOptions(String key,
Properties configuration)
- Description copied from interface:
IModule
- Sets the options for this module.
- Specified by:
setOptions
in interface IModule
- Parameters:
key
- The key (prefix) for this module options. Must be non-null.
The key is used for module specific options.configuration
- The options for all modules. Must be non-null.
setSchedulingStrategyContext
public void setSchedulingStrategyContext(ISchedulingStrategyContext ssc)
- Specified by:
setSchedulingStrategyContext
in interface ITransformer
connect
public IMessageStore connect(IBogorConfiguration bc)
- Description copied from interface:
IModule
- Connects this modules to other modules.
- Specified by:
connect
in interface IModule
- Parameters:
bc
- The Bogor configuration containing modules to connect to.
Must be non-null.
dispose
public void dispose()
- Description copied from interface:
Disposable
- Remove references.
Once called, avoid using this object.
- Specified by:
dispose
in interface Disposable
transform
public IBacktrackingInfo[] transform(ISchedulingStrategyContext ssc,
BlockTransformation t,
Action a)
- Specified by:
transform
in interface ITransformer
transform
public IBacktrackingInfo[] transform(ISchedulingStrategyContext ssc,
InvokeTransformation t,
boolean returned,
IValue returnValue)
- Specified by:
transform
in interface ITransformer
transformEnter
public IBacktrackingInfo[] transformEnter(InvokeTransformation t)
- Specified by:
transformEnter
in interface ITransformer
transformExit
public IBacktrackingInfo[] transformExit(InvokeTransformation t,
IValue returnValue)
- Specified by:
transformExit
in interface ITransformer
unsetSchedulingStrategyContext
public void unsetSchedulingStrategyContext()
- Specified by:
unsetSchedulingStrategyContext
in interface ITransformer
getFSMSymbolTable
protected FSMSymbolTable getFSMSymbolTable(IState state,
int threadId)
addAll
protected void addAll(ArrayList<IBacktrackingInfo> result,
IBacktrackingInfo[] bis)
resolveThrowable
protected ExceptionThrownBogorException resolveThrowable(BogorException mce)
toArray
protected IBacktrackingInfo[] toArray(ArrayList<IBacktrackingInfo> backtrackingInfos)
transformException
protected boolean transformException(Transformation t,
ArrayList<IBacktrackingInfo> result)
transformNextState
protected IBacktrackingInfo[] transformNextState(NextState ns,
Transformation t)
getOptionIds
public Collection<Triple<String,Boolean,OptionScope>> getOptionIds()
- Specified by:
getOptionIds
in interface ISelfDescribingModule
- Returns:
- a set of tuples whose first element says the name of the option,
and whose second element says whether the option is required,
and whose third element says whether the option is private to
this module (and thus prefixed by the interface implemented, e.g.,
edu.ksu.cis.projects.bogor.module.ISearcher
)
or global in scope (and thus no qualifier is prepended).
getOptionDomain
public Pair<Domain,Boolean> getOptionDomain(String id)
- Specified by:
getOptionDomain
in interface ISelfDescribingModule
- Parameters:
id
-
- Returns:
getSuggestedValues
public Collection<String> getSuggestedValues(String id,
IBogorConfiguration bc,
SymbolTable st)
- Specified by:
getSuggestedValues
in interface ISelfDescribingModule
- Parameters:
id
- bc
- st
-
- Returns:
validate
public boolean validate(String id,
String value,
IBogorConfiguration bc,
SymbolTable st,
Collection<FileMessage> errors)
- Description copied from interface:
ISelfDescribingModule
- Checks whether the value of a configuration option is legal.
- Specified by:
validate
in interface ISelfDescribingModule
- Parameters:
id
- value
- bc
- st
- errors
-
- Returns: