Class StringCompatibilityOperationContributor
- java.lang.Object
-
- org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
-
- org.eclipse.epsilon.eol.execute.operations.contributors.compatibility.StringCompatibilityOperationContributor
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class StringCompatibilityOperationContributor extends OperationContributor
-
-
Field Summary
-
Fields inherited from class org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
cachedMethodNames
-
-
Constructor Summary
Constructors Constructor Description StringCompatibilityOperationContributor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
characterAt(int index)
Java charAt returns a 'char': keep it for backwards compatibility (e.g.boolean
contributesTo(java.lang.Object target)
protected java.lang.String
getTarget()
java.lang.String
replace(java.lang.String regex, java.lang.String replacement)
In the previous version of EOL, EolString.replace mapped to String.replaceAll.java.lang.String
replaceLiteral(java.lang.String lit, java.lang.String replacement)
-
Methods inherited from class org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
close, findContributedMethodForEvaluatedParameters, findContributedMethodForEvaluatedParameters, findContributedMethodForUnevaluatedParameters, getContext, getReflectionTarget, includeInheritedMethods, setContext, setTarget
-
-
-
-
Method Detail
-
contributesTo
public boolean contributesTo(java.lang.Object target)
- Specified by:
contributesTo
in classOperationContributor
-
getTarget
protected java.lang.String getTarget()
- Overrides:
getTarget
in classOperationContributor
- Returns:
- The
OperationContributor.target
field.
-
replace
public java.lang.String replace(java.lang.String regex, java.lang.String replacement)
In the previous version of EOL, EolString.replace mapped to String.replaceAll.- Parameters:
regex
-replacement
-- Returns:
-
replaceLiteral
public java.lang.String replaceLiteral(java.lang.String lit, java.lang.String replacement)
- Parameters:
lit
- The String to replace.replacement
- The substitute String.- Returns:
String.replace(CharSequence, CharSequence)
- Since:
- 1.6
-
characterAt
public java.lang.String characterAt(int index)
Java charAt returns a 'char': keep it for backwards compatibility (e.g. Ecore2Thrift needs it), but also provide a 'characterAt' EOL version since EOL does not have that primitive type.
-
-