001    // SECTION-START[License Header]
002    // <editor-fold defaultstate="collapsed" desc=" Generated License ">
003    /*
004     *   Java Object Management and Configuration
005     *   Copyright (C) Christian Schulte, 2005-206
006     *   All rights reserved.
007     *
008     *   Redistribution and use in source and binary forms, with or without
009     *   modification, are permitted provided that the following conditions
010     *   are met:
011     *
012     *     o Redistributions of source code must retain the above copyright
013     *       notice, this list of conditions and the following disclaimer.
014     *
015     *     o Redistributions in binary form must reproduce the above copyright
016     *       notice, this list of conditions and the following disclaimer in
017     *       the documentation and/or other materials provided with the
018     *       distribution.
019     *
020     *   THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
021     *   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
022     *   AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
023     *   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
024     *   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
025     *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
026     *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
027     *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
028     *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
029     *   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
030     *
031     *   $JOMC: UnsupportedOperationExceptionObjectManager.java 4268 2012-02-16 23:14:52Z schulte2005 $
032     *
033     */
034    // </editor-fold>
035    // SECTION-END
036    package org.jomc.test.support;
037    
038    import java.util.Locale;
039    import org.jomc.ObjectManager;
040    
041    // SECTION-START[Documentation]
042    // <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
043    /**
044     * Test {@code ObjectManager} implementation throwing {@code UnsupportedOperationException}s.
045     *
046     * <dl>
047     *   <dt><b>Identifier:</b></dt><dd>org.jomc.test.support.UnsupportedOperationExceptionObjectManager</dd>
048     *   <dt><b>Name:</b></dt><dd>JOMC API</dd>
049     *   <dt><b>Specifications:</b></dt>
050     *     <dd>org.jomc.ObjectManager @ 1.0</dd>
051     *   <dt><b>Abstract:</b></dt><dd>No</dd>
052     *   <dt><b>Final:</b></dt><dd>Yes</dd>
053     *   <dt><b>Stateless:</b></dt><dd>No</dd>
054     * </dl>
055     *
056     * @author <a href="mailto:schulte2005@users.sourceforge.net">Christian Schulte</a> 1.0
057     * @version 1.2
058     */
059    // </editor-fold>
060    // SECTION-END
061    // SECTION-START[Annotations]
062    // <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
063    @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2" )
064    // </editor-fold>
065    // SECTION-END
066    public class UnsupportedOperationExceptionObjectManager
067        implements
068        org.jomc.ObjectManager
069    {
070        // SECTION-START[ObjectManager]
071    
072        public <T> T getObject( final Class<T> specification )
073        {
074            throw new UnsupportedOperationException();
075        }
076    
077        public <T> T getObject( final Class<T> specification, final String implementationName )
078        {
079            throw new UnsupportedOperationException();
080        }
081    
082        public Object getDependency( final Object object, final String dependencyName )
083        {
084            throw new UnsupportedOperationException();
085        }
086    
087        public Object getProperty( final Object object, final String propertyName )
088        {
089            throw new UnsupportedOperationException();
090        }
091    
092        public String getMessage( final Object object, final String messageName, final Locale locale,
093                                  final Object... arguments )
094        {
095            throw new UnsupportedOperationException();
096        }
097    
098        // SECTION-END
099        // SECTION-START[UnsupportedOperationExceptionObjectManager]
100        private static final ObjectManager objectManager = new UnsupportedOperationExceptionObjectManager();
101    
102        public static ObjectManager getObjectManager( final ClassLoader classLoader )
103        {
104            return objectManager;
105        }
106    
107        // SECTION-END
108        // SECTION-START[Constructors]
109        // <editor-fold defaultstate="collapsed" desc=" Generated Constructors ">
110        /** Creates a new {@code UnsupportedOperationExceptionObjectManager} instance. */
111        @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2" )
112        public UnsupportedOperationExceptionObjectManager()
113        {
114            // SECTION-START[Default Constructor]
115            super();
116            // SECTION-END
117        }
118        // </editor-fold>
119        // SECTION-END
120        // SECTION-START[Dependencies]
121        // SECTION-END
122        // SECTION-START[Properties]
123        // SECTION-END
124        // SECTION-START[Messages]
125        // SECTION-END
126    }