[
https://issues.apache.org/jira/browse/HADOOP-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667456#action_12667456
]
Jakob Homan commented on HADOOP-5073:
-------------------------------------
Annotations have the advantage that they can be included in the javadoc,
providing a resource for developers.
To include an annotation in the javadoc, annotate the annotation with
@documented and a runtime retention policy (this policy is required):
{noformat}
// Example annotation that is included in javadoc
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface PublicScope {
public enum Scope {STABLE, EVOLVING};
Scope scope() default Scope.STABLE;
}
{noformat}
and then annotate the class normally:
{noformat}
@PublicScope(scope=PublicScope.Scope.EVOLVING)
public class Tardis {
private int foo;
{noformat}
The generated Javadoc then includes the annotation, right below the direct
known subclasses, and is hyperlinked to the annotation definition, which can
include clarification of what the different values mean.
The actual annotating is pretty wordy (and my example wording is poor), so
it'll be good to pick out a reasonable naming system.
Another nice Annotation feature is the ability to specify its target: package,
class, field, etc.
> Hadoop 1.0 Interface Classification - scope (visibility - public/private) and
> stability
> ---------------------------------------------------------------------------------------
>
> Key: HADOOP-5073
> URL: https://issues.apache.org/jira/browse/HADOOP-5073
> Project: Hadoop Core
> Issue Type: Sub-task
> Reporter: Sanjay Radia
> Assignee: Sanjay Radia
>
> This jira proposes an interface classification for hadoop interfaces.
> The discussion was started in email alias [email protected] in Nov
> 2008.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.