io.sarl.lang.sarl.actionprototype
Interface InferredPrototype
All Known Implementing Classes:
DefaultInferredPrototype
interface InferredPrototype
Provides additional function signatures according the semantic associated to the parameter's default values.

The parameter types are classified into two categories:
  1. the parameter types of the action that are defined by the SARL programmer: the original parameter types; and
  2. the parameter types that are inferred and computed by the SARL compiler according to the default values of the original parameter types: the inferred parameter types.

Example:
br def myfct(a : int, b : float = 0, c : char, d : int = 0)br 
The parameter types are:
  1. Original parameter types: int,float,char,int
  2. Inferred parameter types:
    • int,float,char,int
    • int,char,int
    • int,float,char
    • int,char
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Property Summary
Modifier and type Property and description
QualifiedActionName actionName
Replies the qualified name of the action related to this prototype.
FormalParameterProvider formalParameters
Replies the parameters that are NOT inferred.
ActionParameterTypes formalParameterTypes
Replies the full list of parameter types associated to this prototype.
java.util.Map<K,V> inferredParameterTypes
Replies the prototypes that were inferred according to the semantic of the parameter's default value.
java.util.List<E> originalParameterTypes
Replies an iterator on the original and inferred parameter types.
java.lang.Iterable<T> parameterTypeAlternatives
Replies an iterator on the original and inferred parameter types.
Action Summary
Modifier and type Action and description
abstract QualifiedActionName getActionName
Replies the qualified name of the action related to this prototype.
abstract FormalParameterProvider getFormalParameters
Replies the parameters that are NOT inferred.
abstract ActionParameterTypes getFormalParameterTypes
Replies the full list of parameter types associated to this prototype.
abstract java.util.Map<K,V> getInferredParameterTypes
Replies the prototypes that were inferred according to the semantic of the parameter's default value.
abstract java.util.List<E> getOriginalParameterTypes
Replies an iterator on the original and inferred parameter types.
abstract java.lang.Iterable<T> getParameterTypeAlternatives
Replies an iterator on the original and inferred parameter types.
abstract boolean isVarargs
Replies if the prototype has a vararg.
abstract java.lang.String toString
Replies the formatted list of parameters.
abstract java.lang.String toString(String)
Replies the formatted list of parameters with an associated function name.
Property Details
actionName
val actionName : QualifiedActionName
Replies the qualified name of the action related to this prototype. This qualified name is used for identifying the prototype in a IActionPrototypeProvider.

This property is an alias for the action: getActionName

Returns:
the key.
formalParameters
val formalParameters : FormalParameterProvider
Replies the parameters that are NOT inferred.

This property is an alias for the action: getFormalParameters

Returns:
the parameters.
formalParameterTypes
val formalParameterTypes : ActionParameterTypes
Replies the full list of parameter types associated to this prototype. The replies list does not hide any formal parameter with a default value.

This property is an alias for the action: getFormalParameterTypes

Returns:
the parameter types.
inferredParameterTypes
val inferredParameterTypes : java.util.Map<K,V>
Replies the prototypes that were inferred according to the semantic of the parameter's default value.

This function replies the inferred parameters types (see the documentation of the class for details).

This property is an alias for the action: getInferredParameterTypes

Returns:
the inferred prototypes.
See:
getOriginalParameterTypes , getParameterTypeAlternatives
originalParameterTypes
val originalParameterTypes : java.util.List<E>
Replies an iterator on the original and inferred parameter types.

This property is an alias for the action: getOriginalParameterTypes

Returns:
all the signatures.
See:
getInferredParameterTypes , getParameterTypeAlternatives
parameterTypeAlternatives
val parameterTypeAlternatives : java.lang.Iterable<T>
Replies an iterator on the original and inferred parameter types.

This property is an alias for the action: getParameterTypeAlternatives

Returns:
all the signatures.
See:
getOriginalParameterTypes , getInferredParameterTypes
Action Details
getActionName
def getActionName : QualifiedActionName
Replies the qualified name of the action related to this prototype. This qualified name is used for identifying the prototype in a IActionPrototypeProvider.
Returns:
the key.
getFormalParameters
def getFormalParameters : FormalParameterProvider
Replies the parameters that are NOT inferred.
Returns:
the parameters.
getFormalParameterTypes
def getFormalParameterTypes : ActionParameterTypes
Replies the full list of parameter types associated to this prototype. The replies list does not hide any formal parameter with a default value.
Returns:
the parameter types.
getInferredParameterTypes
def getInferredParameterTypes : java.util.Map<K,V>
Replies the prototypes that were inferred according to the semantic of the parameter's default value.

This function replies the inferred parameters types (see the documentation of the class for details).
Returns:
the inferred prototypes.
See:
getOriginalParameterTypes , getParameterTypeAlternatives
getOriginalParameterTypes
def getOriginalParameterTypes : java.util.List<E>
Replies an iterator on the original and inferred parameter types.
Returns:
all the signatures.
See:
getInferredParameterTypes , getParameterTypeAlternatives
getParameterTypeAlternatives
def getParameterTypeAlternatives : java.lang.Iterable<T>
Replies an iterator on the original and inferred parameter types.
Returns:
all the signatures.
See:
getOriginalParameterTypes , getInferredParameterTypes
isVarargs
def isVarargs : boolean
Replies if the prototype has a vararg.
Returns:
true if the last parameter is a vararg, false otherwise.
toString
def toString : java.lang.String
Replies the formatted list of parameters.
Returns:
the parameter list.
toString(String)
def toString(String) : java.lang.String
Replies the formatted list of parameters with an associated function name.
Parameters:
functionName - the name of the function to be put in the replied string.
Returns:
the parameter list.