1 /* 2 * This file is part of AceLogger. 3 * 4 * AceLogger is free software: you can redistribute it and/or modify it under the terms of the GNU 5 * Lesser General Public License as published by the Free Software Foundation, either version 3 of 6 * the License, or (at your option) any later version. 7 * 8 * AceLogger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 * Lesser General Public License for more details. 11 * 12 * You should have received a copy of the GNU Lesser General Public License along with AceLogger. 13 * If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. 14 */ 15 package net.sourceforge.acelogger.location.gatherer; 16 17 import net.sourceforge.acelogger.location.LogEventLocation; 18 19 /** 20 * A implementation of {@link LocationGatherer} that do nothing. 21 * 22 * @author Zardi (https://sourceforge.net/users/daniel_zardi) 23 * @version 1.0.0 24 * @since 1.0.0 25 */ 26 public class EmptyLocationGatherer implements LocationGatherer { 27 28 /** 29 * The identifier of this location gatherer. 30 */ 31 private String identifier; 32 33 /** 34 * Constructs a EmptyLocationGatherer using the supplied identifier. 35 * 36 * @param identifier 37 * The identifier of this location gatherer. 38 * @since 1.0.0 39 */ 40 public EmptyLocationGatherer(String identifier) { 41 setIdentifier(identifier); 42 } 43 44 /** {@inheritDoc} */ 45 public final String getIdentifier() { 46 return identifier; 47 } 48 49 /** 50 * Sets the string that identifies this object. 51 * 52 * @param identifier 53 * The identifier of this object. 54 * @since 1.0.0 55 */ 56 private void setIdentifier(String identifier) { 57 this.identifier = identifier; 58 } 59 60 /** {@inheritDoc} */ 61 public LogEventLocation getCallLocation(Thread currenThread) { 62 return new LogEventLocation(); 63 } 64 65 /** {@inheritDoc} */ 66 public LogEventLocation getCallLocation() { 67 return new LogEventLocation(); 68 } 69 70 }