From d68ba4d9a1a31524bb9a06d52c00d648caf6f1e2 Mon Sep 17 00:00:00 2001 From: "ray.j.greenwell" Date: Wed, 31 Mar 2010 17:41:41 +0000 Subject: [PATCH] Allow a reason to be specified on ReplacedBy. Annotate IntMap. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2764 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/annotation/ReplacedBy.java | 7 ++++++- src/java/com/samskivert/util/IntMap.java | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/java/com/samskivert/annotation/ReplacedBy.java b/src/java/com/samskivert/annotation/ReplacedBy.java index 76f82a99..ddaaf95f 100644 --- a/src/java/com/samskivert/annotation/ReplacedBy.java +++ b/src/java/com/samskivert/annotation/ReplacedBy.java @@ -39,7 +39,12 @@ 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. + * It is suggested that you follow the "@see" javadoc semantics for specifying a reference. */ String value (); + + /** + * The reason the replacement is suggested, in case it's not obvious. + */ + String reason() default ""; } diff --git a/src/java/com/samskivert/util/IntMap.java b/src/java/com/samskivert/util/IntMap.java index a27cfd6e..d34089e2 100644 --- a/src/java/com/samskivert/util/IntMap.java +++ b/src/java/com/samskivert/util/IntMap.java @@ -23,6 +23,8 @@ package com.samskivert.util; import java.util.Map; import java.util.Set; +import com.samskivert.annotation.ReplacedBy; + /** * An int map is a map that uses integers as keys and provides accessors * that eliminate the need to create and manipulate superfluous @@ -30,6 +32,8 @@ import java.util.Set; * and therefore provides all of the standard accessors (for which * Integer objects should be supplied as keys). */ +@ReplacedBy(value="java.util.Map", reason="Boxing shouldn't be a major concern. " + + "The performance gain from using an IntMap probably isn't worth trouble.") public interface IntMap extends Map { /**