Class PtolemyInjector


  • public class PtolemyInjector
    extends java.lang.Object
    PtolemyInjector contains a static reference to the Injector loaded with Ptolemy Modules for the given target platform. The rationale for having a static reference is to avoid hurdle of passing the injector to all needed parties.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Anar Huseynov, Erwin de Ley
    Pt.AcceptedRating:
    Red (ahuseyno)
    Pt.ProposedRating:
    Red (ahuseyno)
    • Constructor Summary

      Constructors 
      Constructor Description
      PtolemyInjector()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void createInjector​(java.lang.Iterable<? extends PtolemyModule> modules)
      Create an injector for the given set of modules.
      static void createInjector​(PtolemyModule... modules)
      Create an injector for the given set of modules.
      static Injector getInjector()
      Return the PtolemyInjector.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PtolemyInjector

        public PtolemyInjector()
    • Method Detail

      • createInjector

        public static void createInjector​(PtolemyModule... modules)
        Create an injector for the given set of modules.
        Parameters:
        modules - the array of modules that contain interface to implementation bindings used to implement dependency injection.
      • createInjector

        public static void createInjector​(java.lang.Iterable<? extends PtolemyModule> modules)
        Create an injector for the given set of modules.
        Parameters:
        modules - the array of modules that contain interface to implementation bindings used to implement dependency injection.
      • getInjector

        public static Injector getInjector()
        Return the PtolemyInjector. Note that createInjector(PtolemyModule...) must be called prior to using this method.
        Returns:
        the PtolemyInjector that was created with the supplied modules.