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

    Fields
    Modifier and Type
    Field
    Description
    static 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" rule
    static final String
    Variable name for the new status of the triggering thing in a "thing status trigger" rule
    static final String
    Variable name for the previous state of an item in a "changed state triggered" rule
    static final String
    Variable name for the previous status of the triggering thing in a "thing status trigger" rule
    static final String
    Variable name for the cache
    static final String
    Variable name for the received command in a "command triggered" rule
    static final String
    Variable name for the received event in a "trigger event" rule
    static final String
     
    static final String
    Variable name for the triggering channel in a "trigger event" rule
    static final String
    Variable name for the group in a "member of state triggered" or "member of command triggered" rule
    static final String
    Variable name for the group in a "member of state triggered" or "member of command triggered" rule
    static final String
    Variable name for the item in a "state triggered" or "command triggered" rule
    static final String
    Variable name for the item in a "state triggered" or "command triggered" rule
    static final String
    Variable name for the triggering thing in a "thing status trigger" rule

    Fields inherited from class org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer

    _annotationTypesBuilder, _typeReferenceBuilder
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • VAR_INPUT

      public static final String VAR_INPUT
      Variable name for the input string in a "script transformation" or "script profile"
      See Also:
    • VAR_TRIGGERING_GROUP

      public static final String 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

      public static final String 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

      public static final String VAR_TRIGGERING_ITEM
      Variable name for the item in a "state triggered" or "command triggered" rule
      See Also:
    • VAR_TRIGGERING_ITEM_NAME

      public static final String VAR_TRIGGERING_ITEM_NAME
      Variable name for the item in a "state triggered" or "command triggered" rule
      See Also:
    • VAR_PREVIOUS_STATE

      public static final String VAR_PREVIOUS_STATE
      Variable name for the previous state of an item in a "changed state triggered" rule
      See Also:
    • VAR_NEW_STATE

      public static final String 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

      public static final String VAR_RECEIVED_COMMAND
      Variable name for the received command in a "command triggered" rule
      See Also:
    • VAR_RECEIVED_EVENT

      public static final String VAR_RECEIVED_EVENT
      Variable name for the received event in a "trigger event" rule
      See Also:
    • VAR_TRIGGERING_CHANNEL

      public static final String VAR_TRIGGERING_CHANNEL
      Variable name for the triggering channel in a "trigger event" rule
      See Also:
    • VAR_TRIGGERING_THING

      public static final String VAR_TRIGGERING_THING
      Variable name for the triggering thing in a "thing status trigger" rule
      See Also:
    • VAR_PREVIOUS_STATUS

      public static final String VAR_PREVIOUS_STATUS
      Variable name for the previous status of the triggering thing in a "thing status trigger" rule
      See Also:
    • VAR_NEW_STATUS

      public static final String VAR_NEW_STATUS
      Variable name for the new status of the triggering thing in a "thing status trigger" rule
      See Also:
    • VAR_PRIVATE_CACHE

      public static final String VAR_PRIVATE_CACHE
      Variable name for the cache
      See Also:
    • VAR_SHARED_CACHE

      public static final String 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 is true
    • infer

      public void infer(org.eclipse.emf.ecore.EObject script, org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase)
      Specified by:
      infer in interface org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer
      Overrides:
      infer in class org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer