org.eclipse.xtext.purexbase.jvmmodel
Class PureXbaseJvmModelInferrer
java.lang.Object
org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
org.eclipse.xtext.purexbase.jvmmodel.PureXbaseJvmModelInferrer
- All Implemented Interfaces:
- IJvmModelInferrer
public class PureXbaseJvmModelInferrer
- extends 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 Xtend models link against the JVM model rather than the source model. The JVM
model elements should be associated with their source element by means of the
IJvmModelAssociator
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PureXbaseJvmModelInferrer
public PureXbaseJvmModelInferrer()
_infer
protected void _infer(Model m,
IAcceptor<JvmDeclaredType> acceptor,
boolean prelinkingPhase)
name
public java.lang.String name(org.eclipse.emf.ecore.resource.Resource res)
containsReturn
public boolean containsReturn(XExpression expr)
compile
public java.lang.String compile(XBlockExpression obj,
ImportManager mnr)
infer
public void infer(org.eclipse.emf.ecore.EObject m,
IAcceptor<JvmDeclaredType> acceptor,
boolean prelinkingPhase)
- Description copied from interface:
IJvmModelInferrer
- is called for the root element of a resource just once.
- Specified by:
infer
in interface IJvmModelInferrer
- Overrides:
infer
in class AbstractModelInferrer
- Parameters:
m
- - the root element from the parse resultacceptor
- - an acceptor awaiting derived JvmDeclaredType
sprelinkingPhase
- - whether the call is done in a pre-linking phase. During this phase clients may not do linking which
relies on indexed information, because the index might not be fully computed yet.