8000 Adds 2.10 reflection guide in its entirety by heathermiller · Pull Request #162 · scala/docs.scala-lang · GitHub
[go: up one dir, main page]

Skip to content

Adds 2.10 reflection guide in its entirety #162

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

Conversation

heathermiller
Copy link
Member

Review by @xeno-by

Merging in the meantime.

@heathermiller
Copy link
Member Author

@phaller helped out a lot with the Exprs, Scopes, Annotations, etc section. First big props to him for the help, and second-- any comments welcome from @phaller (if up for it!)

@xeno-by
Copy link
Contributor
xeno-by commented Jan 15, 2013

<3

xeno-by added a commit that referenced this pull request Jan 15, 2013
Adds 2.10 reflection guide in its entirety
@xeno-by xeno-by merged commit b67e79d into master Jan 15, 2013
`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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scala written annotations that subclass ClassfileAnnotation are not stored actually as Java annotations as specified, the implementation warns you that:

annot-nonconst.scala:2: warning: Implementation restriction: subclassing Classfile does not
make your annotation visible at runtime.  If that is what
you want, you must write the annotation class in Java.
class Ann2(value: String) extends annotation.ClassfileAnnotation
      ^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this. Will fix.

@SethTisue SethTisue deleted the reflection-guide-final branch March 3, 2017 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0