io.sarl.lang.sarl.actionprototype
Class DefaultActionPrototypeProvider
All Superinterfaces:
IActionPrototypeProvider
class DefaultActionPrototypeProvider
extends java.lang.Object
implements IActionPrototypeProvider
Provides additional function signatures according the semantic associated to the parameter's default values.

This implementation is thread-safe.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Constructor Summary
Constructor and description
new
Construct a provider of action prototypes.
Action Summary
Modifier and type Action and description
ActionPrototype createActionPrototype(String,ActionParameterTypes)
QualifiedActionName createConstructorQualifiedName(JvmIdentifiableElement)
IActionPrototypeContext createContext
java.lang.String createFunctionNameForDefaultValueID(String)
ActionParameterTypes createParameterTypes(boolean,FormalParameterProvider)
ActionParameterTypes createParameterTypesForVoid
ActionParameterTypes createParameterTypesFromJvmModel(boolean,List<E>)
ActionParameterTypes createParameterTypesFromSarlModel(boolean,List<E>)
ActionParameterTypes createParameterTypesFromString(String)
protected InferredPrototype createPrototype(Context,QualifiedActionName,boolean,FormalParameterProvider)
Build and replies the inferred action signature for the element with the given ID.
final InferredPrototype createPrototypeFromJvmModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>)
final InferredPrototype createPrototypeFromSarlModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>)
QualifiedActionName createQualifiedActionName(JvmIdentifiableElement,String)
java.lang.String extractDefaultValueString(JvmFormalParameter)
java.lang.Iterable<T> getPrototypes(IActionPrototypeContext,QualifiedActionName)
InferredPrototype getPrototypes(IActionPrototypeContext,QualifiedActionName,ActionParameterTypes)
java.lang.String qualifyDefaultValueID(String,String)
protected java.lang.String toIdentifier(LightweightTypeReference)
Generate a generic identifier for the given type reference.
java.lang.String toJavaArgument(String,String)
protected org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference unifiesType(JvmTypeReference)
Unify the type representation for the given JVM type.
Constructor Details
new
new
Construct a provider of action prototypes.
Action Details
createActionPrototype(String,ActionParameterTypes)
def createActionPrototype(String,ActionParameterTypes) : ActionPrototype
createConstructorQualifiedName(JvmIdentifiableElement)
def createConstructorQualifiedName(JvmIdentifiableElement) : QualifiedActionName
createContext
def createContext : IActionPrototypeContext
createFunctionNameForDefaultValueID(String)
def createFunctionNameForDefaultValueID(String) : java.lang.String
createParameterTypes(boolean,FormalParameterProvider)
def createParameterTypes(boolean,FormalParameterProvider) : ActionParameterTypes
createParameterTypesForVoid
def createParameterTypesForVoid : ActionParameterTypes
createParameterTypesFromJvmModel(boolean,List<E>)
def createParameterTypesFromJvmModel(boolean,List<E>) : ActionParameterTypes
createParameterTypesFromSarlModel(boolean,List<E>)
def createParameterTypesFromSarlModel(boolean,List<E>) : ActionParameterTypes
createParameterTypesFromString(String)
def createParameterTypesFromString(String) : ActionParameterTypes
createPrototype(Context,QualifiedActionName,boolean,FormalParameterProvider)
protected def createPrototype(Context,QualifiedActionName,boolean,FormalParameterProvider) : 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.
createPrototypeFromJvmModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>)
def createPrototypeFromJvmModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>) : InferredPrototype
createPrototypeFromSarlModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>)
def createPrototypeFromSarlModel(IActionPrototypeContext,QualifiedActionName,boolean,List<E>) : InferredPrototype
createQualifiedActionName(JvmIdentifiableElement,String)
def createQualifiedActionName(JvmIdentifiableElement,String) : QualifiedActionName
extractDefaultValueString(JvmFormalParameter)
def extractDefaultValueString(JvmFormalParameter) : java.lang.String
getPrototypes(IActionPrototypeContext,QualifiedActionName)
def getPrototypes(IActionPrototypeContext,QualifiedActionName) : java.lang.Iterable<T>
getPrototypes(IActionPrototypeContext,QualifiedActionName,ActionParameterTypes)
def getPrototypes(IActionPrototypeContext,QualifiedActionName,ActionParameterTypes) : InferredPrototype
qualifyDefaultValueID(String,String)
def qualifyDefaultValueID(String,String) : java.lang.String
toIdentifier(LightweightTypeReference)
protected def toIdentifier(LightweightTypeReference) : java.lang.String
Generate a generic identifier for the given type reference.
Parameters:
reference - the type.
Returns:
the identifier.
Since:
0.12
toJavaArgument(String,String)
def toJavaArgument(String,String) : java.lang.String
unifiesType(JvmTypeReference)
protected def unifiesType(JvmTypeReference) : org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
Unify the type representation for the given JVM type. This function supports the lambda type.
Parameters:
reference - the type.
Returns:
the unified type.
Since:
0.12