17ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu/** 27ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * Copyright (c) 2004-2011 QOS.ch 388c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * All rights reserved. 47ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * 588c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * Permission is hereby granted, free of charge, to any person obtaining 688c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * a copy of this software and associated documentation files (the 788c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * "Software"), to deal in the Software without restriction, including 888c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * without limitation the rights to use, copy, modify, merge, publish, 988c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * distribute, sublicense, and/or sell copies of the Software, and to 1088c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * permit persons to whom the Software is furnished to do so, subject to 1188c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * the following conditions: 127ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * 1388c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * The above copyright notice and this permission notice shall be 1488c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * included in all copies or substantial portions of the Software. 157ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * 1688c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1788c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1888c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 1988c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 2088c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 2188c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 2288c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 237ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * 2488c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu */ 2588c4c456766193e012eb890e2208473d99b91f83Ceki Gulcupackage org.slf4j.impl; 2688c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu 2788c4c456766193e012eb890e2208473d99b91f83Ceki Gulcuimport org.slf4j.IMarkerFactory; 2888c4c456766193e012eb890e2208473d99b91f83Ceki Gulcuimport org.slf4j.MarkerFactory; 2988c4c456766193e012eb890e2208473d99b91f83Ceki Gulcuimport org.slf4j.helpers.BasicMarkerFactory; 3088c4c456766193e012eb890e2208473d99b91f83Ceki Gulcuimport org.slf4j.spi.MarkerFactoryBinder; 3188c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu 3288c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu/** 3388c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * 3488c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * The binding of {@link MarkerFactory} class with an actual instance of 3588c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * {@link IMarkerFactory} is performed using information returned by this class. 3688c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * 3788c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * This class is meant to provide a *dummy* StaticMarkerBinder to the slf4j-api module. 3888c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * Real implementations are found in each SLF4J binding project, e.g. slf4j-nop, 3988c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * slf4j-simple, slf4j-log4j12 etc. 4088c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * 4188c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * @author Ceki Gülcü 4288c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu */ 4388c4c456766193e012eb890e2208473d99b91f83Ceki Gulcupublic class StaticMarkerBinder implements MarkerFactoryBinder { 4488c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu 4531212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu /** 4631212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu * The unique instance of this class. 4731212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu */ 4831212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu public static final StaticMarkerBinder SINGLETON = new StaticMarkerBinder(); 4931212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu 5031212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu private StaticMarkerBinder() { 5131212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu throw new UnsupportedOperationException("This code should never make it into the jar"); 5231212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu } 5331212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu 5431212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu /** 5531212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu * Currently this method always returns an instance of 5631212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu * {@link BasicMarkerFactory}. 5731212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu */ 5831212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu public IMarkerFactory getMarkerFactory() { 5931212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu throw new UnsupportedOperationException("This code should never make it into the jar"); 6031212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu } 6131212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu 6231212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu /** 6331212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu * Currently, this method returns the class name of 6431212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu * {@link BasicMarkerFactory}. 6531212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu */ 6631212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu public String getMarkerFactoryClassStr() { 6731212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu throw new UnsupportedOperationException("This code should never make it into the jar"); 6831212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu } 6931212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu 7088c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu} 71