diff --git a/src/java/com/samskivert/annotation/ReplacedBy.java b/src/java/com/samskivert/annotation/ReplacedBy.java new file mode 100644 index 00000000..7a5358bb --- /dev/null +++ b/src/java/com/samskivert/annotation/ReplacedBy.java @@ -0,0 +1,43 @@ +// +// $Id$ +// +// samskivert library - useful routines for java programs +// Copyright (C) 2001-2010 Michael Bayne, et al. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +package com.samskivert.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * An annotation for indicating that something has a preferred implementation elsewhere, without + * going so far as to deprecate it. + */ +@Documented +@Retention(RetentionPolicy.SOURCE) +@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) +public @interface ReplacedBy +{ + /** + * A human-readable String containing a reference to the replacement Class, method, or field. + * It is suggested that you follow the "&at;see" javadoc semantics for specifying a reference. + */ + String value (); +}