Class 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 String VAR_NEW_STATE
      Variable name for the new state of an item in a "changed state triggered" or "updated state triggered" rule
      static String VAR_PREVIOUS_STATE
      Variable name for the previous state of an item in a "changed state triggered" rule
      static String VAR_RECEIVED_COMMAND
      Variable name for the received command in a "command triggered" rule
      static String VAR_RECEIVED_EVENT
      Variable name for the received event in a "trigger event" rule
      static String VAR_TRIGGERING_ITEM
      Variable name for the item in a "state triggered" or "command triggered" rule
      static String VAR_TRIGGERING_ITEM_NAME
      Variable name for the item in a "state triggered" or "command triggered" rule
      • Fields inherited from class org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer

        _annotationTypesBuilder, _typeReferenceBuilder
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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
    • Field Detail

      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • VAR_RECEIVED_COMMAND

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

        public static final String VAR_RECEIVED_EVENT
        Variable name for the received event in a "trigger event" rule
        See Also:
        Constant Field Values
    • Constructor Detail

      • ScriptJvmModelInferrer

        public ScriptJvmModelInferrer()
    • Method Detail

      • _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:
        element - - 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 iPrelinkingPhase 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