io.sarl.lang.typesystem.cast
Class ObjectAndPrimitiveBasedCastOperationCandidateSelector
All Superinterfaces:
ICastOperationCandidateSelector
class ObjectAndPrimitiveBasedCastOperationCandidateSelector
extends java.lang.Object
implements ICastOperationCandidateSelector
Select the functions that should be called in place of a classic cast operator.

This selector searches for the functions with:
  • the prefix text to for the object types, e.g. toString; and
  • the post-fix text Value for the primitive types, e.g. (intValue.

This selector also applies the following criteria, assuming E is the type of the expression to cast and T is the destination type:
  • T is assignable from the the return value's type.
  • E is assignable from the argument's type.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.9
Nested Type Summary
Modifier and type Type and description
protected class ObjectAndPrimitiveBasedCastOperationCandidateSelector.ObjectAndPrimitiveBasedSelector
Select the functions that should be called in place of a classic cast operator.
Constructor Summary
Constructor and description
new
Action Summary
Constructor Details
new
new
Action Details
prepare(AbstractTypeComputationState,LightweightTypeReference,LightweightTypeReference)
def prepare(AbstractTypeComputationState,LightweightTypeReference,LightweightTypeReference) : ISelector