io.sarl.lang.sarl.actionprototype
Interface IActionPrototypeProvider
All Known Implementing Classes:
DefaultActionPrototypeProvider
interface IActionPrototypeProvider
Provides additional function signatures according the semantic associated to the parameter's default values.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Action Summary
Modifier and type Action and description
default void clear
Reset all the prototypes.
Deprecated for removal since 0.10: since 0.10, see createContext()
default void clear(JvmIdentifiableElement)
Reset all the prototypes associated to the given container.
Deprecated for removal since 0.10: since 0.10, see createContext()
abstract ActionPrototype createActionPrototype(String,ActionParameterTypes)
Build a prototype of an action.
abstract QualifiedActionName createConstructorQualifiedName(JvmIdentifiableElement)
Build an identifier for a constructor in the given container.
abstract IActionPrototypeContext createContext
Create an empty context.
abstract java.lang.String createFunctionNameForDefaultValueID(String)
Replies the name of the function that should store the default value associated to the parameter with the given id.
abstract ActionParameterTypes createParameterTypes(boolean,FormalParameterProvider)
Build an identifier with the given parameters.
abstract ActionParameterTypes createParameterTypesForVoid
Build an identifier for an action that has no formal parameter.
abstract ActionParameterTypes createParameterTypesFromJvmModel(boolean,List<E>)
Build an identifier with the given parameters.
abstract ActionParameterTypes createParameterTypesFromSarlModel(boolean,List<E>)
Build an identifier with the given parameters.
abstract ActionParameterTypes createParameterTypesFromString(String)
Build an identifier with the given parameters.
default InferredPrototype createPrototypeFromJvmModel(QualifiedActionName,boolean,List<E>)
Build and replies the inferred action signature for the element with the given ID.
abstract InferredPrototype createPrototypeFromJvmModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>)
Build and replies the inferred action signature for the element with the given ID.
default InferredPrototype createPrototypeFromSarlModel(QualifiedActionName,boolean,List<E>)
Build and replies the inferred action signature for the element with the given ID.
abstract InferredPrototype createPrototypeFromSarlModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>)
Build and replies the inferred action signature for the element with the given ID.
abstract QualifiedActionName createQualifiedActionName(JvmIdentifiableElement,String)
Build an identifier based on the function's name and a container name.
abstract java.lang.String extractDefaultValueString(JvmFormalParameter)
Replies the default value of the given formal parameter.
default java.lang.Iterable<T> getPrototypes(QualifiedActionName)
Replies the inferred action signatures for the element with the given ID.
Deprecated for removal since 0.10: since 0.10, see getPrototypes(IActionPrototypeContext, QualifiedActionName)
abstract java.lang.Iterable<T> getPrototypes(IActionPrototypeContext,QualifiedActionName)
Replies the inferred action signatures for the element with the given ID.
default InferredPrototype getPrototypes(QualifiedActionName,ActionParameterTypes)
Replies the inferred action signature for the given IDs.
abstract InferredPrototype getPrototypes(IActionPrototypeContext,QualifiedActionName,ActionParameterTypes)
Replies the inferred action signature for the given IDs.
abstract java.lang.String qualifyDefaultValueID(String,String)
Qualify the default value identifier with the given container's qualified name if the ID is not qualified.
abstract java.lang.String toJavaArgument(String,String)
Replies the calling agument associated to the parameter with the given id.
Action Details
clear
def clear
Reset all the prototypes.
Deprecated:
since 0.10, see createContext()
clear(JvmIdentifiableElement)
def clear(JvmIdentifiableElement)
Reset all the prototypes associated to the given container.
Parameters:
container - the element for which the prototype store must be reset.
Deprecated:
since 0.10, see createContext()
createActionPrototype(String,ActionParameterTypes)
def createActionPrototype(String,ActionParameterTypes) : ActionPrototype
Build a prototype of an action.
Parameters:
actionName - the name of the action.
parameters - the ID of the parameters.
Returns:
the prototype.
createConstructorQualifiedName(JvmIdentifiableElement)
def createConstructorQualifiedName(JvmIdentifiableElement) : QualifiedActionName
Build an identifier for a constructor in the given container.
Parameters:
container - the element for which a constructor ID must be created.
Returns:
the qualified name.
createContext
def createContext : IActionPrototypeContext
Create an empty context.
Returns:
the context.
Since:
0.10
createFunctionNameForDefaultValueID(String)
def createFunctionNameForDefaultValueID(String) : java.lang.String
Replies the name of the function that should store the default value associated to the parameter with the given id.
Parameters:
id - the parameter's identifier.
Returns:
the field's name.
Since:
0.12
createParameterTypes(boolean,FormalParameterProvider)
def createParameterTypes(boolean,FormalParameterProvider) : ActionParameterTypes
Build an identifier with the given parameters.
Parameters:
isVarargs - indicates if the signature has a variadic parameter.
provider - the provider of the formal parameters.
Returns:
the list of the parameters' types.
createParameterTypesForVoid
def createParameterTypesForVoid : ActionParameterTypes
Build an identifier for an action that has no formal parameter.
Returns:
the list of the parameters' types.
createParameterTypesFromJvmModel(boolean,List<E>)
def createParameterTypesFromJvmModel(boolean,List<E>) : ActionParameterTypes
Build an identifier with the given parameters.
Parameters:
isVarargs - indicates if the signature has a variadic parameter.
parameters - the list of the formal parameter to put in the signature key.
Returns:
the list of the parameters' types.
createParameterTypesFromSarlModel(boolean,List<E>)
def createParameterTypesFromSarlModel(boolean,List<E>) : ActionParameterTypes
Build an identifier with the given parameters.
Parameters:
isVarargs - indicates if the signature has a variadic parameter.
parameters - the list of the formal parameter to put in the signature key.
Returns:
the list of the parameters' types.
createParameterTypesFromString(String)
def createParameterTypesFromString(String) : ActionParameterTypes
Build an identifier with the given parameters.

The given parameter must following the format of the value given by toString().
Parameters:
parameters - the string representation of the parameters.
Returns:
the list of the parameters' types.
createPrototypeFromJvmModel(QualifiedActionName,boolean,List<E>)
def createPrototypeFromJvmModel(QualifiedActionName,boolean,List<E>) : InferredPrototype
Build and replies the inferred action signature for the element with the given ID. This function creates the different signatures according to the definition, or not, of default values for the formal parameters.
Parameters:
id - identifier of the function.
isVarargs - indicates if the signature has a variadic parameter.
parameters - list of the formal parameters of the function.
Returns:
the signature or null if none.
Deprecated:
since 0.10, see createPrototypeFromJvmModel(IActionPrototypeContext, QualifiedActionName, boolean, List)
createPrototypeFromJvmModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>)
def createPrototypeFromJvmModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>) : InferredPrototype
Build and replies the inferred action signature for the element with the given ID. This function creates the different signatures according to the definition, or not, of default values for the formal parameters.
Parameters:
context - the context in which the prototype should be created.
id - identifier of the function.
isVarargs - indicates if the signature has a variadic parameter.
parameters - list of the formal parameters of the function.
Returns:
the signature or null if none.
Since:
0.10
See:
createContext
createPrototypeFromSarlModel(QualifiedActionName,boolean,List<E>)
def createPrototypeFromSarlModel(QualifiedActionName,boolean,List<E>) : InferredPrototype
Build and replies the inferred action signature for the element with the given ID. This function creates the different signatures according to the definition, or not, of default values for the formal parameters.
Parameters:
id - identifier of the function.
isVarargs - indicates if the signature has a variadic parameter.
parameters - list of the formal parameters of the function.
Returns:
the signature or null if none.
Deprecated:
since 0.10, see createPrototypeFromSarlModel(IActionPrototypeContext, QualifiedActionName, boolean, List)
createPrototypeFromSarlModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>)
def createPrototypeFromSarlModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>) : InferredPrototype
Build and replies the inferred action signature for the element with the given ID. This function creates the different signatures according to the definition, or not, of default values for the formal parameters.
Parameters:
context - the context in which the prototype should be created.
id - identifier of the function.
isVarargs - indicates if the signature has a variadic parameter.
parameters - list of the formal parameters of the function.
Returns:
the signature or null if none.
Since:
0.10
See:
createContext
createQualifiedActionName(JvmIdentifiableElement,String)
def createQualifiedActionName(JvmIdentifiableElement,String) : QualifiedActionName
Build an identifier based on the function's name and a container name.
Parameters:
container - the container of the function.
functionName - the name of the function.
Returns:
the qualified name.
extractDefaultValueString(JvmFormalParameter)
def extractDefaultValueString(JvmFormalParameter) : java.lang.String
Replies the default value of the given formal parameter.

This function replies the string representation of the default value.
Parameters:
parameter - the parameter for which the default value should be extracted.
Returns:
the default value, or null if none.
getPrototypes(QualifiedActionName)
def getPrototypes(QualifiedActionName) : java.lang.Iterable<T>
Replies the inferred action signatures for the element with the given ID.
Parameters:
id - the ID of the action.
Returns:
the signature, never null .
Deprecated:
since 0.10, see getPrototypes(IActionPrototypeContext, QualifiedActionName)
getPrototypes(IActionPrototypeContext,QualifiedActionName)
def getPrototypes(IActionPrototypeContext,QualifiedActionName) : java.lang.Iterable<T>
Replies the inferred action signatures for the element with the given ID.
Parameters:
context - the context in which the prototype should be created.
id - the ID of the action.
Returns:
the signature, never null .
Since:
0.10
See:
createContext
getPrototypes(QualifiedActionName,ActionParameterTypes)
def getPrototypes(QualifiedActionName,ActionParameterTypes) : InferredPrototype
Replies the inferred action signature for the given IDs.
Parameters:
actionID - the ID of the action.
signatureID - ID of the signature.
Returns:
the signature or null if none.
Deprecated:
since 0.10, see getPrototypes(IActionPrototypeContext, QualifiedActionName, ActionParameterTypes)
getPrototypes(IActionPrototypeContext,QualifiedActionName,ActionParameterTypes)
def getPrototypes(IActionPrototypeContext,QualifiedActionName,ActionParameterTypes) : InferredPrototype
Replies the inferred action signature for the given IDs.
Parameters:
context - the context in which the prototype should be created.
actionID - the ID of the action.
signatureID - ID of the signature.
Returns:
the signature or null if none.
Since:
0.10
See:
createContext
qualifyDefaultValueID(String,String)
def qualifyDefaultValueID(String,String) : java.lang.String
Qualify the default value identifier with the given container's qualified name if the ID is not qualified.
Parameters:
containerQualifiedName - the qualified name.
id - the parameter's identifier.
Returns:
the qualified name.
toJavaArgument(String,String)
def toJavaArgument(String,String) : java.lang.String
Replies the calling agument associated to the parameter with the given id.
Parameters:
callerQualifiedName - qualified name of the type where the argument is used.
argumentSpecification - the parameter's identifier.
Returns:
the calling argument for the formal parameter.