Coverage for lbCVMFSTools/Injector.py : 98%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
############################################################################### # (c) Copyright 2016 CERN # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # # # # In applying this licence, CERN does not waive the privileges and immunities # # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ############################################################################### @author: Stefan-Gabriel CHITIC '''
""" The injector provides instances implementing interfaces using classes, factories or live objects """
"Bind an interface to a class"
"Bind an interface to an object"
"Bind an interface to a factory method, called with no parameters"
"Get an object implementing an interface"
# Import this and provide your implementations
"Metaclass to implements dependency injection"
# class has a custom metaclass, we extend it on the fly # rebuild the class else: # class has alredy the correct metaclass due to inheritance return cls
"Bind constructor arguments to implementations"
|