Class EMFPatternLanguageJvmModelInferrer
- java.lang.Object
-
- org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
-
- org.eclipse.viatra.query.patternlanguage.emf.jvmmodel.EMFPatternLanguageJvmModelInferrer
-
- All Implemented Interfaces:
org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
public class EMFPatternLanguageJvmModelInferrer 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.
- No Reference:
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INVALID_PATTERN_MODEL_CODE
static java.lang.String
INVALID_TYPEREF_CODE
static java.lang.String
SPECIFICATION_BUILDER_CODE
-
Constructor Summary
Constructors Constructor Description EMFPatternLanguageJvmModelInferrer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_infer(PatternModel model, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPrelinkingPhase)
Is called for each PatternModel instance in a resource.boolean
enableQueryGroupGeneration(boolean queryGroupGenerationEnabled)
void
infer(org.eclipse.emf.ecore.EObject model, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPrelinkingPhase)
void
inferPattern(Pattern pattern, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPrelinkingPhase)
Is called for each Pattern instance in a resource.
-
-
-
Field Detail
-
INVALID_PATTERN_MODEL_CODE
public static final java.lang.String INVALID_PATTERN_MODEL_CODE
- See Also:
- Constant Field Values
-
INVALID_TYPEREF_CODE
public static final java.lang.String INVALID_TYPEREF_CODE
- See Also:
- Constant Field Values
-
SPECIFICATION_BUILDER_CODE
public static final java.lang.String SPECIFICATION_BUILDER_CODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
enableQueryGroupGeneration
@Inject public boolean enableQueryGroupGeneration(boolean queryGroupGenerationEnabled)
- Since:
- 2.3
-
inferPattern
public void inferPattern(Pattern pattern, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPrelinkingPhase)
Is called for each Pattern instance in a resource.- Parameters:
pattern
- - the model to create one or more JvmDeclaredTypes from.acceptor
- - each created JvmDeclaredType without a container should be passed to the acceptor in order get attached to the current resource.isPreLinkingPhase
- - whether the method is called in a pre linking phase, i.e. when the global index isn't fully updated. You must not rely on linking using the index if this istrue
-
_infer
protected void _infer(PatternModel model, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPrelinkingPhase)
Is called for each PatternModel instance in a resource.- Parameters:
model
- - the model to create one or more JvmDeclaredTypes from.acceptor
- - each created JvmDeclaredType without a container should be passed to the acceptor in order get attached to the current resource.isPreLinkingPhase
- - whether the method is called in a pre linking phase, i.e. when the global index isn't fully updated. You must not rely on linking using the index if this istrue
-
infer
public void infer(org.eclipse.emf.ecore.EObject model, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPrelinkingPhase)
- Specified by:
infer
in interfaceorg.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
- Overrides:
infer
in classorg.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
-
-