io.sarl.lang.jvmmodel
Interface IBaseJvmModelInferrer
All Known Implementing Classes:
SARLJvmModelInferrer
interface IBaseJvmModelInferrer
Provide the base functions and context used for inferring JVM elements from SARL element.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.15
Property Summary
Modifier and type Property and description
org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder jvmAnnotationReferenceBuilder
Replies the builder of JVM annotations that is linked to the generation context.
org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder jvmTypeReferenceBuilder
Replies the builder of JVM type references that is linked to the generation context.
Action Summary
Modifier and type Action and description
abstract void appendSyntheticDispatchMethods(XtendTypeDeclaration,JvmGenericType)
Append the synthetic methods for declared dispatch methods.
abstract void closeContext(GenerationContext)
Close a generation context.
abstract void copyAndFixTypeParameters(List<E>,JvmTypeParameterDeclarator)
Copy the given type parameters and fix their definition for following the Ecore specifications.
abstract void fixTypeParameters(JvmTypeParameterDeclarator)
Fix the definition of the type parameters.
abstract GenerationContext getContext(JvmIdentifiableElement)
Replies the SARL-specific generation context.
abstract org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder getJvmAnnotationReferenceBuilder
Replies the builder of JVM annotations that is linked to the generation context.
abstract org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder getJvmTypeReferenceBuilder
Replies the builder of JVM type references that is linked to the generation context.
abstract void inferLocalClass(AnonymousClass,String,JvmFeature)
Infer and transform the local (anonymous) class.
abstract void logInternalError(String)
Log an internal error but do not fail.
abstract void logInternalError(Throwable)
Log an internal error but do not fail.
abstract GenerationContext openContext(EObject,JvmDeclaredType,Iterable<T>)
Open the context for the generation of a SARL-specific element.
abstract void transform(XtendMember,JvmGenericType,boolean)
Transform the given member to JVM elements.
abstract void translateAnnotationsTo(List<E>,JvmAnnotationTarget)
Translate the given annotations and put them into the given target, using the standard rules provided by Xtext/Xtend.
abstract void translateParameter(JvmExecutable,XtendParameter)
Translate the given parameter to the given executable using the default translation rules provided by Xtext/Xtend.
Property Details
jvmAnnotationReferenceBuilder
val jvmAnnotationReferenceBuilder : org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder
Replies the builder of JVM annotations that is linked to the generation context.

This property is an alias for the action: getJvmAnnotationReferenceBuilder

Returns:
the builder.
jvmTypeReferenceBuilder
val jvmTypeReferenceBuilder : org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder
Replies the builder of JVM type references that is linked to the generation context.

This property is an alias for the action: getJvmTypeReferenceBuilder

Returns:
the builder.
Action Details
appendSyntheticDispatchMethods(XtendTypeDeclaration,JvmGenericType)
def appendSyntheticDispatchMethods(XtendTypeDeclaration,JvmGenericType)
Append the synthetic methods for declared dispatch methods.
Parameters:
source - the type in which the dispatch methods are defined.
target - the received of the synthetic methods.
closeContext(GenerationContext)
def closeContext(GenerationContext)
Close a generation context.
Parameters:
context - the context to be closed.
copyAndFixTypeParameters(List<E>,JvmTypeParameterDeclarator)
def copyAndFixTypeParameters(List<E>,JvmTypeParameterDeclarator)
Copy the given type parameters and fix their definition for following the Ecore specifications. Usually, the major fix is the adding of the upper bounds Object when the type parameter does not specify an upper bound.
Parameters:
typeParameters - the type parameters to copy and fix.
target - the receiver of the type parameters.
fixTypeParameters(JvmTypeParameterDeclarator)
def fixTypeParameters(JvmTypeParameterDeclarator)
Fix the definition of the type parameters. Usually, the major fix is the adding of the upper bounds Object when the type parameter does not specify an upper bound.
Parameters:
target - the receiver of the type parameters to be fixed.
getContext(JvmIdentifiableElement)
def getContext(JvmIdentifiableElement) : GenerationContext
Replies the SARL-specific generation context.
Parameters:
type - the generated type.
Returns:
the SARL-specific generation context.
getJvmAnnotationReferenceBuilder
def getJvmAnnotationReferenceBuilder : org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder
Replies the builder of JVM annotations that is linked to the generation context.
Returns:
the builder.
getJvmTypeReferenceBuilder
def getJvmTypeReferenceBuilder : org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder
Replies the builder of JVM type references that is linked to the generation context.
Returns:
the builder.
inferLocalClass(AnonymousClass,String,JvmFeature)
def inferLocalClass(AnonymousClass,String,JvmFeature)
Infer and transform the local (anonymous) class.
Parameters:
anonymousClass - the anonymous class to be inferred.
localClassName - the name of the class.
container - the container feature of the anonymous class.
logInternalError(String)
def logInternalError(String)
Log an internal error but do not fail.
Parameters:
message - the internal message.
logInternalError(Throwable)
def logInternalError(Throwable)
Log an internal error but do not fail.
Parameters:
exception - the exception to log.
openContext(EObject,JvmDeclaredType,Iterable<T>)
def openContext(EObject,JvmDeclaredType,Iterable<T>) : GenerationContext
Open the context for the generation of a SARL-specific element.
Parameters:
sarlObject - the SARL object that is the cause of the generation.
type - the generated type.
supportedMemberTypes - the types of the supported members.
Returns:
the created context.
transform(XtendMember,JvmGenericType,boolean)
def transform(XtendMember,JvmGenericType,boolean)
Transform the given member to JVM elements.
Parameters:
sourceMember - the member to transform.
container - the receiver.
allowDispatch - indicates if dispatching functions are allowed.
translateAnnotationsTo(List<E>,JvmAnnotationTarget)
def translateAnnotationsTo(List<E>,JvmAnnotationTarget)
Translate the given annotations and put them into the given target, using the standard rules provided by Xtext/Xtend.
Parameters:
annotations - the annotations to translate.
target - the receiver of the annotations.
translateParameter(JvmExecutable,XtendParameter)
def translateParameter(JvmExecutable,XtendParameter)
Translate the given parameter to the given executable using the default translation rules provided by Xtext/Xtend.
Parameters:
executable - the executable to extend.
parameter - the parameter to convert an put inside the executable.