Ye olde experiment.
I am starting to prefer things in the guava library when there are equivalents. I've been wondering what we want to do about informing people about the changes. Something more interesting will happen, because I want a place to put useful bits of code built atop guava, and that's not samskivert, at least not now. So anyway, here's a lighter-weight @Deprecated sorta annotation. It can be used to indicate methods that have a replacement in guava (or new stuff in the standard java libraries). It will show up in the javadocs. Let's see how it looks. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2708 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -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 ();
|
||||
}
|
||||
Reference in New Issue
Block a user