Package ca.ubc.stat.blang.jvmmodel
Class BlangDslJvmModelInferrer
java.lang.Object
org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
ca.ubc.stat.blang.jvmmodel.BlangDslJvmModelInferrer
- All Implemented Interfaces:
org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
public class BlangDslJvmModelInferrer
extends org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
Infers a JVM model from the source model.
The JVM model should contain all elements that would appear in the Java code which is generated from the source model. Other models link against the JVM model rather than the source model.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer.NullImpl
-
Field Summary
Fields inherited from class org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
_annotationTypesBuilder, _typeReferenceBuilder
-
Constructor Summary
Constructors Constructor Description BlangDslJvmModelInferrer()
-
Method Summary
Modifier and Type Method Description protected void
_infer(BlangModel model, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase)
The dispatch methodinfer
is called for each instance of the given element's type that is contained in a resource.void
infer(org.eclipse.emf.ecore.EObject model, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase)
Methods inherited from class org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
_infer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
BlangDslJvmModelInferrer
public BlangDslJvmModelInferrer()
-
-
Method Details
-
_infer
protected void _infer(BlangModel model, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase)The dispatch methodinfer
is called for each instance of the given element's type that is contained in a resource.- Parameters:
element
- the model to create one or moredeclared types
from.acceptor
- each createdtype
without a container should be passed to the acceptor in order get attached to the current resource. The acceptor'saccept(..)
method takes the constructed empty type for the pre-indexing phase. This one is further initialized in the indexing phase using the closure you pass to the returnedinitializeLater(..)
.isPreIndexingPhase
- whether the method is called in a pre-indexing phase, i.e. when the global index is not yet fully updated. You must not rely on linking using the index if isPreIndexingPhase istrue
.
-
infer
public void infer(org.eclipse.emf.ecore.EObject model, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase)- Specified by:
infer
in interfaceorg.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
- Overrides:
infer
in classorg.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
-