org.eclipse.xtext.purexbase.jvmmodel
Class PureXbaseJvmModelInferrer

java.lang.Object
  extended by org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
IJvmModelInferrer.NullImpl
 
Constructor Summary
PureXbaseJvmModelInferrer()
           
 
Method Summary
protected  void _infer(Model m, IAcceptor<JvmDeclaredType> acceptor, boolean prelinkingPhase)
           
 java.lang.String compile(XBlockExpression obj, ImportManager mnr)
           
 boolean containsReturn(XExpression expr)
           
 void infer(org.eclipse.emf.ecore.EObject m, IAcceptor<JvmDeclaredType> acceptor, boolean prelinkingPhase)
          is called for the root element of a resource just once.
 java.lang.String name(org.eclipse.emf.ecore.resource.Resource res)
           
 
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 Detail

PureXbaseJvmModelInferrer

public PureXbaseJvmModelInferrer()
Method Detail

_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 result
acceptor - - an acceptor awaiting derived JvmDeclaredTypes
prelinkingPhase - - 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.