ua.gradsoft.termware.strategies
Class FirstTopStrategy

java.lang.Object
  extended by ua.gradsoft.termware.AbstractBuildinTransformer
      extended by ua.gradsoft.termware.strategies.AbstractTermRewritingStrategy
          extended by ua.gradsoft.termware.strategies.FirstTopStrategy
All Implemented Interfaces:
ITermRewritingStrategy, ITermTransformer

public class FirstTopStrategy
extends AbstractTermRewritingStrategy

FirstTop


Constructor Summary
FirstTopStrategy()
           
 
Method Summary
 String getDescription()
          get description of strategy
 String getName()
          get name of transformer.
 Term transform(Term t, TermSystem system, TransformationContext ctx)
          main work of strategy is here: transform term t in system by applying transformers in 'Star' via subclass-specific algorithm.
 
Methods inherited from class ua.gradsoft.termware.strategies.AbstractTermRewritingStrategy
getStar, hasOtherwise, internalsAtFirst
 
Methods inherited from class ua.gradsoft.termware.AbstractBuildinTransformer
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ua.gradsoft.termware.ITermTransformer
getSource
 

Constructor Detail

FirstTopStrategy

public FirstTopStrategy()
Method Detail

transform

public Term transform(Term t,
                      TermSystem system,
                      TransformationContext ctx)
               throws TermWareException
Description copied from class: AbstractTermRewritingStrategy
main work of strategy is here: transform term t in system by applying transformers in 'Star' via subclass-specific algorithm.

Specified by:
transform in interface ITermRewritingStrategy
Specified by:
transform in interface ITermTransformer
Specified by:
transform in class AbstractTermRewritingStrategy
Parameters:
t - - term to transform
system - - system which we use
ctx - - context of transformation
Returns:
- transformed term.
Throws:
TermWareException

getDescription

public String getDescription()
get description of strategy

Specified by:
getDescription in interface ITermTransformer
Overrides:
getDescription in class AbstractBuildinTransformer
See Also:
TransformerDescription

getName

public String getName()
Description copied from class: AbstractBuildinTransformer
get name of transformer. Default behaviour -- return the value of annotation @TransformerName binded to this.getClass().

Specified by:
getName in interface ITermTransformer
Overrides:
getName in class AbstractBuildinTransformer
Returns:
name of transformer.
See Also:
TransformerName