Skip to content
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

第9回 リフレクションその3 #11

Open
sakai-y opened this issue Jan 27, 2017 · 4 comments
Open

第9回 リフレクションその3 #11

sakai-y opened this issue Jan 27, 2017 · 4 comments

Comments

@sakai-y
Copy link
Contributor

sakai-y commented Jan 27, 2017

2017/2/10

リフレクションによるフィールドの取得・操作
アノテーションの取得


@t-kunou t-kunou mentioned this issue Feb 10, 2017
@sakai-y
Copy link
Contributor Author

sakai-y commented Feb 10, 2017

  • static finalでもFINALフラグを落とせば書き換えられる
  • アノテーションには"生存期間"が存在する
  • リフレクションも独自アノテーションも主にフレームワーク作成者が利用する

@sakai-y
Copy link
Contributor Author

sakai-y commented Feb 10, 2017

リフレクションで取得したFieldのインスタンスは取得する度に異なるのでsetAccessible(false)しなくていいって話
http://hhelibex.hatenablog.jp/entry/20100221/1266726908

@sakai-y
Copy link
Contributor Author

sakai-y commented Feb 10, 2017

みんな大好きlombokの@DataRetentionPolicy.SOURCE

@t-kunou
Copy link
Contributor

t-kunou commented Feb 10, 2017

~ はビット反転の演算子。組み込みではよく使う。

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

No branches or pull requests

2 participants