001package jmri;
002
003/**
004 * Interface indicating that the InstanceManager can create an object of this
005 * type when needed by a request.
006 * <p>
007 * Implies that the default constructor of the class does everything needed to
008 * get a working object.
009 * <p>
010 * More specifically, the constructors or code called by the constructors 
011 * of classes implementing this interface (that have the InstanceManager automatically
012 * create their objects) should never ask the InstanceManager for reference to other
013 * automatically-created types. Doing so
014 * may lead to an infinite loop in initialization.
015 * <p>
016 * If the object needs to have obtain references, see
017 * {@link InstanceManagerAutoInitialize} and the discussion there for 
018 * a possible solution.
019 * <p>
020 * If this interface isn't sufficient because the InstanceManager requests are through an
021 * interface, e.g. FooManager is an interface with default implementation
022 * DefaultFooManager, see {@link InstanceInitializer} and its default
023 * implementation in {@link jmri.managers.DefaultInstanceInitializer}.
024 * That mechanism can also do more complicated initialization sequences.
025 *
026 * @author Bob Jacobsen Copyright (C) 2012
027 */
028public interface InstanceManagerAutoDefault {
029}