8000 Correct description of ClassfileAnnotation by phaller · Pull Request #163 · scala/docs.scala-lang · GitHub
[go: up one dir, main page]

Skip to content

Correct description of ClassfileAnnotation #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions overviews/reflection/annotations-names-scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ have been persisted, so that they can be read from the classfile containing
the annotated declarations. A custom annotation type can be made persistent by
inheriting from `scala.annotation.StaticAnnotation` or
`scala.annotation.ClassfileAnnotation`. As a result, instances of the
annotation type are stored either as special attributes in the corresponding
classfile (`StaticAnnotation`) or as a Java annotation
(`ClassfileAnnotation`). Note that subclassing just
annotation type are stored as special attributes in the corresponding
classfile. Note that subclassing just
`scala.annotation.Annotation` is not enough to have the corresponding metadata
persisted for runtime reflection.
persisted for runtime reflection. Moreover, subclassing
`scala.annotation.ClassfileAnnotation` does not make your annotation visible
as a Java annotation at runtime; that requires writing the annotation class
in Java.

The API distinguishes between two kinds of annotations:

Expand Down
0