Reflection and Metadata

523 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
523
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Reflection and Metadata

  1. 1. ReflectionMichal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 2 / 10
  2. 2. Terminology Introspection—self-representation can be queried. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 3 / 10
  3. 3. Terminology Introspection—self-representation can be queried. Intercession—self-representation can be changed. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 3 / 10
  4. 4. Terminology (II) Structural reflection—concerned with structure. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 4 / 10
  5. 5. Terminology (II) Structural reflection—concerned with structure. Behavioral reflection—concerned with execution. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 4 / 10
  6. 6. Reflection in Object LanguagesEverything is an object. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 5 / 10
  7. 7. PurposeTools. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 6 / 10
  8. 8. Alternative Source code Byte code AST Custom represenation Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 7 / 10
  9. 9. MetadataMichal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 8 / 10
  10. 10. What Is Metadata? Field and method names Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 9 / 10
  11. 11. What Is Metadata? Field and method names Class names Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 9 / 10
  12. 12. What Is Metadata? Field and method names Class names Various modifiers Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 9 / 10
  13. 13. What Is Metadata? Field and method names Class names Various modifiers Even type information Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 9 / 10
  14. 14. What Is Metadata? Field and method names Class names Various modifiers Even type information More or less anything that is not compiled into binary Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 9 / 10
  15. 15. Is Metadata Used Outside of Source Code? Yes Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and MetadataDecember 14, 2010 10 / 10
  16. 16. Is Metadata Used Outside of Source Code? Yes Whenever we are referring to a class we are supplying it with an additional information Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and MetadataDecember 14, 2010 10 / 10
  17. 17. Is Metadata Used Outside of Source Code? Yes Whenever we are referring to a class we are supplying it with an additional information Why don’t we include metadata in the source code? Is it possible? Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and MetadataDecember 14, 2010 10 / 10

×