bad.robot

good robots do what they're told

Deprecated Annotation

Why didn’t Sun add a value property to the @Deprecated annotation? Instead of

@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface Deprecated {
}

which kind of implies we should do the following.

@Deprecated
/** @deprecated use {@link Foo} instead */
public class GoneOff {
   // ...
}

why can’t we have

@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface MyDeprecated{
   public abstract String value() default "";
}

which means we can use

@MyDeprecated("use Foo instead")
public class GoneOff {
   // ...
}

Over to you...