ua.gradsoft.termware.transformers.string
Class StringSubstTransformer
java.lang.Object
ua.gradsoft.termware.AbstractBuildinTransformer
ua.gradsoft.termware.transformers.string.StringSubstTransformer
- All Implemented Interfaces:
- ITermTransformer
public final class StringSubstTransformer
- extends AbstractBuildinTransformer
Transformer for String.subst
- code string::subst(s,x,y) replace all occurences of regular exptression x to y in s and return changed string.
- String.subst("a","a","b")="b"
- String.subst("qqsd000sd","sd",a)="qqa000a"
- String.subst("qqsd000sd","q*sd","a")="a000sd"
- Author:
- Ruslan Shevchenko
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringSubstTransformer
public StringSubstTransformer()
getDescription
public String getDescription()
- Description copied from class:
AbstractBuildinTransformer
- get description of transformer.
Default behaviour -- return the value of annotation @TransformerDescription binded to this.getClass().
- 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
transform
public Term transform(Term t,
TermSystem system,
TransformationContext ctx)
throws TermWareException
- Description copied from interface:
ITermTransformer
- attempt to transform term
t .
- Parameters:
t - - term to transformsystem - - system which give us access to ebvironment.ctx - - context of transformation.
- Returns:
- - transformed term.
- Throws:
TermWareException
static_transform
public static Term static_transform(Term t,
TermSystem system,
TransformationContext ctx)
throws TermWareException
- Throws:
TermWareException
internalsAtFirst
public boolean internalsAtFirst()