io.sarl.lang.typesystem.cast
Class CastedExpressionTypeComputationState
All Superinterfaces:
org.eclipse.xtext.xbase.typesystem.computation.ITypeComputationState
class CastedExpressionTypeComputationState
extends java.lang.Object
State for type computation associated to the cast operator.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.9
Property Summary
Modifier and type Property and description
CastScopeSession castScopeSession
Replies the scope to be used for the cast operator.
Constructor Summary
Action Summary
Modifier and type Action and description
protected org.eclipse.xtext.xbase.typesystem.computation.ILinkingCandidate createCandidate(SarlCastedExpression,ExpressionTypeComputationState,IIdentifiableElementDescription)
Create a candidate from the given description.
CastScopeSession getCastScopeSession
Replies the scope to be used for the cast operator.
java.util.List<E> getLinkingCandidates(SarlCastedExpression)
Compute the best candidates for the feature behind the cast operator.
boolean isCastOperatorLinkingEnabled(SarlCastedExpression)
Replies if the linking to the cast operator functions is enabled.
void resetFeature(SarlCastedExpression)
Reset the properties of the given feature in order to have casted expression that is not linked to an operation.
Property Details
castScopeSession
val castScopeSession : CastScopeSession
Replies the scope to be used for the cast operator.

This property is an alias for the action: getCastScopeSession

Returns:
the scope.
Constructor Details
new(SarlCastedExpression,AbstractTypeComputationState,ICastOperationCandidateSelector)
new(SarlCastedExpression,AbstractTypeComputationState,ICastOperationCandidateSelector)
Constructor.
Parameters:
expression - the cast expression to consider.
delegate - the original state.
candidateValidator - the validator for the candidate functions to be cast operation.
Action Details
createCandidate(SarlCastedExpression,ExpressionTypeComputationState,IIdentifiableElementDescription)
protected def createCandidate(SarlCastedExpression,ExpressionTypeComputationState,IIdentifiableElementDescription) : org.eclipse.xtext.xbase.typesystem.computation.ILinkingCandidate
Create a candidate from the given description.
Parameters:
cast - the cast operator.
state - the state
description - the description of the cast linked operation.
Returns:
the linking candidate.
getCastScopeSession
def getCastScopeSession : CastScopeSession
Replies the scope to be used for the cast operator.
Returns:
the scope.
getLinkingCandidates(SarlCastedExpression)
def getLinkingCandidates(SarlCastedExpression) : java.util.List<E>
Compute the best candidates for the feature behind the cast operator.
Parameters:
cast - the cast operator.
Returns:
the candidates.
isCastOperatorLinkingEnabled(SarlCastedExpression)
def isCastOperatorLinkingEnabled(SarlCastedExpression) : boolean
Replies if the linking to the cast operator functions is enabled.
Parameters:
cast - the cast operator.
Returns:
true if the linking is enabled.
resetFeature(SarlCastedExpression)
def resetFeature(SarlCastedExpression)
Reset the properties of the given feature in order to have casted expression that is not linked to an operation.
Parameters:
object - the expression to reset.