Class ScriptJvmModelInferrer
java.lang.Object
org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
org.openhab.core.model.script.jvmmodel.ScriptJvmModelInferrer
- All Implemented Interfaces:
org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
- Direct Known Subclasses:
RulesJvmModelInferrer
public class ScriptJvmModelInferrer
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.
- Author:
- Oliver Libutzki - Xtext 2.5.0 migration
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer.NullImpl
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Variable name for the input string in a "script transformation" or "script profile"static final String
Variable name for the new state of an item in a "changed state triggered" or "updated state triggered" rulestatic final String
Variable name for the new status of the triggering thing in a "thing status trigger" rulestatic final String
Variable name for the previous state of an item in a "changed state triggered" rulestatic final String
Variable name for the previous status of the triggering thing in a "thing status trigger" rulestatic final String
Variable name for the cachestatic final String
Variable name for the received command in a "command triggered" rulestatic final String
Variable name for the received event in a "trigger event" rulestatic final String
static final String
Variable name for the triggering channel in a "trigger event" rulestatic final String
Variable name for the group in a "member of state triggered" or "member of command triggered" rulestatic final String
Variable name for the group in a "member of state triggered" or "member of command triggered" rulestatic final String
Variable name for the item in a "state triggered" or "command triggered" rulestatic final String
Variable name for the item in a "state triggered" or "command triggered" rulestatic final String
Variable name for the triggering thing in a "thing status trigger" ruleFields inherited from class org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
_annotationTypesBuilder, _typeReferenceBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_infer
(Script script, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase) Is called for each instance of the first argument's type contained in a resource.void
infer
(org.eclipse.emf.ecore.EObject script, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase) Methods inherited from class org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
_infer
-
Field Details
-
VAR_INPUT
Variable name for the input string in a "script transformation" or "script profile"- See Also:
-
VAR_TRIGGERING_GROUP
Variable name for the group in a "member of state triggered" or "member of command triggered" rule- See Also:
-
VAR_TRIGGERING_GROUP_NAME
Variable name for the group in a "member of state triggered" or "member of command triggered" rule- See Also:
-
VAR_TRIGGERING_ITEM
Variable name for the item in a "state triggered" or "command triggered" rule- See Also:
-
VAR_TRIGGERING_ITEM_NAME
Variable name for the item in a "state triggered" or "command triggered" rule- See Also:
-
VAR_PREVIOUS_STATE
Variable name for the previous state of an item in a "changed state triggered" rule- See Also:
-
VAR_NEW_STATE
Variable name for the new state of an item in a "changed state triggered" or "updated state triggered" rule- See Also:
-
VAR_RECEIVED_COMMAND
Variable name for the received command in a "command triggered" rule- See Also:
-
VAR_RECEIVED_EVENT
Variable name for the received event in a "trigger event" rule- See Also:
-
VAR_TRIGGERING_CHANNEL
Variable name for the triggering channel in a "trigger event" rule- See Also:
-
VAR_TRIGGERING_THING
Variable name for the triggering thing in a "thing status trigger" rule- See Also:
-
VAR_PREVIOUS_STATUS
Variable name for the previous status of the triggering thing in a "thing status trigger" rule- See Also:
-
VAR_NEW_STATUS
Variable name for the new status of the triggering thing in a "thing status trigger" rule- See Also:
-
VAR_PRIVATE_CACHE
Variable name for the cache- See Also:
-
VAR_SHARED_CACHE
- See Also:
-
-
Constructor Details
-
ScriptJvmModelInferrer
public ScriptJvmModelInferrer()
-
-
Method Details
-
_infer
protected void _infer(Script script, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase) Is called for each instance of the first argument's type contained in a resource.- Parameters:
script
- 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.isPreIndexingPhase
- 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 isPreIndexingPhase istrue
-
infer
public void infer(org.eclipse.emf.ecore.EObject script, 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
-