io.sarl.lang.typesystem
Interface IPureOperationNameValidator
All Known Implementing Classes:
PureOperationNameValidator
interface IPureOperationNameValidator
Test if names are for pure or not pure operations.

This implementation assumes that any function with a name starting with "get", "is", "has" is a pure function. It also assumes that "equals", "hashCode", "clone" and "toString" are also pure functions.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.6
Action Summary
Modifier and type Action and description
abstract boolean isNamePatternForNotPureOperation(String)
Replies if the given expression has a side effect in the context of the given operation.
default boolean isNamePatternForNotPureOperation(XtendFunction)
Replies if the given operation has a name which is assumed to be for a pure function by default.
default boolean isNamePatternForNotPureOperation(JvmOperation)
Replies if the given operation has a name which is assumed to be for a pure function by default.
abstract boolean isNamePatternForPureOperation(String)
Replies if the given operation has a name which is assumed to be for a pure function by default.
default boolean isNamePatternForPureOperation(XtendFunction)
Replies if the given operation has a name which is assumed to be for a pure function by default.
default boolean isNamePatternForPureOperation(JvmOperation)
Replies if the given operation has a name which is assumed to be for a pure function by default.
Action Details
isNamePatternForNotPureOperation(String)
def isNamePatternForNotPureOperation(String) : boolean
Replies if the given expression has a side effect in the context of the given operation.
Parameters:
name - the simple name of the operation.
Returns:
true if the operation has a side effects.
Since:
0.12
isNamePatternForNotPureOperation(XtendFunction)
def isNamePatternForNotPureOperation(XtendFunction) : boolean
Replies if the given operation has a name which is assumed to be for a pure function by default.
Parameters:
operation - the operation to test.
Returns:
true if the operation has no side effect.
See:
isNamePatternForPureOperation(JvmOperation)
isNamePatternForNotPureOperation(JvmOperation)
def isNamePatternForNotPureOperation(JvmOperation) : boolean
Replies if the given operation has a name which is assumed to be for a pure function by default.
Parameters:
operation - the operation to test.
Returns:
true if the operation has no side effect.
See:
isNamePatternForPureOperation(JvmOperation)
isNamePatternForPureOperation(String)
def isNamePatternForPureOperation(String) : boolean
Replies if the given operation has a name which is assumed to be for a pure function by default.
Parameters:
name - the simple name of the operation.
Returns:
true if the operation has a side effects.
Since:
0.12
isNamePatternForPureOperation(XtendFunction)
def isNamePatternForPureOperation(XtendFunction) : boolean
Replies if the given operation has a name which is assumed to be for a pure function by default.
Parameters:
operation - the operation to test.
Returns:
true if the operation has a side effects.
See:
isNamePatternForNotPureOperation(JvmOperation)
isNamePatternForPureOperation(JvmOperation)
def isNamePatternForPureOperation(JvmOperation) : boolean
Replies if the given operation has a name which is assumed to be for a pure function by default.
Parameters:
operation - the operation to test.
Returns:
true if the operation has a side effects.
See:
isNamePatternForNotPureOperation(JvmOperation)