SlideShare a Scribd company logo
1 of 18
Download to read offline
Reflection




Michal P´se (CTU in Prague)
        ıˇ                    Object Programming Lect. 12: Reflection and Metadata December 14, 2010   2 / 10
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
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
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
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
Reflection in Object Languages




Everything is an object.




 Michal P´se (CTU in Prague)
         ıˇ                    Object Programming Lect. 12: Reflection and Metadata December 14, 2010   5 / 10
Purpose




Tools.




  Michal P´se (CTU in Prague)
          ıˇ                    Object Programming Lect. 12: Reflection and Metadata December 14, 2010   6 / 10
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
Metadata




Michal P´se (CTU in Prague)
        ıˇ                    Object Programming Lect. 12: Reflection and Metadata December 14, 2010   8 / 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
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
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
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
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
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
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
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

More Related Content

What's hot

TCS Job Interview Questions
TCS Job Interview QuestionsTCS Job Interview Questions
TCS Job Interview QuestionsNavdeep Kumar
 
Redundancy analysis on linked data #cold2014 #ISWC2014
Redundancy analysis on linked data #cold2014 #ISWC2014Redundancy analysis on linked data #cold2014 #ISWC2014
Redundancy analysis on linked data #cold2014 #ISWC2014honghan2013
 
Tcs technical interview questions
Tcs technical interview questionsTcs technical interview questions
Tcs technical interview questionsAshu0711
 
Enhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesEnhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesUniversity of York
 
OntoLex-TEI: Inspiration from Global WordNet
OntoLex-TEI: Inspiration from Global WordNetOntoLex-TEI: Inspiration from Global WordNet
OntoLex-TEI: Inspiration from Global WordNetPretaLLOD
 
Query Translation for Data Sources with Heterogeneous Content Semantics
Query Translation for Data Sources with Heterogeneous Content Semantics Query Translation for Data Sources with Heterogeneous Content Semantics
Query Translation for Data Sources with Heterogeneous Content Semantics Jie Bao
 
Bt0078 website design
Bt0078   website designBt0078   website design
Bt0078 website designsmumbahelp
 
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...Iman Mirrezaei
 
EG-ICE 2015 - Coping with IFC lists in the ifcOWL ontology
EG-ICE 2015 - Coping with IFC lists in the ifcOWL ontologyEG-ICE 2015 - Coping with IFC lists in the ifcOWL ontology
EG-ICE 2015 - Coping with IFC lists in the ifcOWL ontologyPieter Pauwels
 
Comparative Analysis of Transformer Based Pre-Trained NLP Models
Comparative Analysis of Transformer Based Pre-Trained NLP ModelsComparative Analysis of Transformer Based Pre-Trained NLP Models
Comparative Analysis of Transformer Based Pre-Trained NLP Modelssaurav singla
 
IDL to C++11 initial submission presentation
IDL to C++11 initial submission presentationIDL to C++11 initial submission presentation
IDL to C++11 initial submission presentationRemedy IT
 
Crash-course in Natural Language Processing
Crash-course in Natural Language ProcessingCrash-course in Natural Language Processing
Crash-course in Natural Language ProcessingVsevolod Dyomkin
 

What's hot (15)

TCS Job Interview Questions
TCS Job Interview QuestionsTCS Job Interview Questions
TCS Job Interview Questions
 
Redundancy analysis on linked data #cold2014 #ISWC2014
Redundancy analysis on linked data #cold2014 #ISWC2014Redundancy analysis on linked data #cold2014 #ISWC2014
Redundancy analysis on linked data #cold2014 #ISWC2014
 
Tcs technical interview questions
Tcs technical interview questionsTcs technical interview questions
Tcs technical interview questions
 
Enhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose LanguagesEnhancing Xtext for General Purpose Languages
Enhancing Xtext for General Purpose Languages
 
OntoLex-TEI: Inspiration from Global WordNet
OntoLex-TEI: Inspiration from Global WordNetOntoLex-TEI: Inspiration from Global WordNet
OntoLex-TEI: Inspiration from Global WordNet
 
Query Translation for Data Sources with Heterogeneous Content Semantics
Query Translation for Data Sources with Heterogeneous Content Semantics Query Translation for Data Sources with Heterogeneous Content Semantics
Query Translation for Data Sources with Heterogeneous Content Semantics
 
Aspects of NLP Practice
Aspects of NLP PracticeAspects of NLP Practice
Aspects of NLP Practice
 
Bt0078 website design
Bt0078   website designBt0078   website design
Bt0078 website design
 
master_thesis_greciano_v2
master_thesis_greciano_v2master_thesis_greciano_v2
master_thesis_greciano_v2
 
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
 
EG-ICE 2015 - Coping with IFC lists in the ifcOWL ontology
EG-ICE 2015 - Coping with IFC lists in the ifcOWL ontologyEG-ICE 2015 - Coping with IFC lists in the ifcOWL ontology
EG-ICE 2015 - Coping with IFC lists in the ifcOWL ontology
 
Comparative Analysis of Transformer Based Pre-Trained NLP Models
Comparative Analysis of Transformer Based Pre-Trained NLP ModelsComparative Analysis of Transformer Based Pre-Trained NLP Models
Comparative Analysis of Transformer Based Pre-Trained NLP Models
 
IDL to C++11 initial submission presentation
IDL to C++11 initial submission presentationIDL to C++11 initial submission presentation
IDL to C++11 initial submission presentation
 
Bhushan Rathi
Bhushan RathiBhushan Rathi
Bhushan Rathi
 
Crash-course in Natural Language Processing
Crash-course in Natural Language ProcessingCrash-course in Natural Language Processing
Crash-course in Natural Language Processing
 

Viewers also liked

Viewers also liked (14)

Flow Control
Flow ControlFlow Control
Flow Control
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
Functional Concepts
Functional ConceptsFunctional Concepts
Functional Concepts
 
Garbage Collection
Garbage CollectionGarbage Collection
Garbage Collection
 
Multiple Dispatch
Multiple DispatchMultiple Dispatch
Multiple Dispatch
 
Every Consumer is a Business user is a Consumer
Every Consumer is a Business user is a ConsumerEvery Consumer is a Business user is a Consumer
Every Consumer is a Business user is a Consumer
 
What Would You Say
What Would You SayWhat Would You Say
What Would You Say
 
T+L Copy2
T+L Copy2T+L Copy2
T+L Copy2
 
Inheritance
InheritanceInheritance
Inheritance
 
Type Systems
Type SystemsType Systems
Type Systems
 
M2MSys ITIL Executive Summary
M2MSys ITIL Executive SummaryM2MSys ITIL Executive Summary
M2MSys ITIL Executive Summary
 
What Would You Say
What Would You SayWhat Would You Say
What Would You Say
 
Setup1
Setup1Setup1
Setup1
 
België Nederland
België NederlandBelgië Nederland
België Nederland
 

Similar to Reflection and Metadata

Query expansion based on visual content new
Query expansion based on visual content newQuery expansion based on visual content new
Query expansion based on visual content newLazaros Tsochatzidis
 
From Data to Knowledge - Profiling & Interlinking Web Datasets
From Data to Knowledge - Profiling & Interlinking Web DatasetsFrom Data to Knowledge - Profiling & Interlinking Web Datasets
From Data to Knowledge - Profiling & Interlinking Web DatasetsStefan Dietze
 
Ontology Building and its Application using Hozo
Ontology Building and its Application using HozoOntology Building and its Application using Hozo
Ontology Building and its Application using HozoKouji Kozaki
 
Retrieval, Crawling and Fusion of Entity-centric Data on the Web
Retrieval, Crawling and Fusion of Entity-centric Data on the WebRetrieval, Crawling and Fusion of Entity-centric Data on the Web
Retrieval, Crawling and Fusion of Entity-centric Data on the WebStefan Dietze
 
4th Natural Language Interface over the Web of Data (NLIWoD) workshop and QAL...
4th Natural Language Interface over the Web of Data (NLIWoD) workshop and QAL...4th Natural Language Interface over the Web of Data (NLIWoD) workshop and QAL...
4th Natural Language Interface over the Web of Data (NLIWoD) workshop and QAL...Holistic Benchmarking of Big Linked Data
 

Similar to Reflection and Metadata (7)

Query expansion based on visual content new
Query expansion based on visual content newQuery expansion based on visual content new
Query expansion based on visual content new
 
Minor Project
Minor ProjectMinor Project
Minor Project
 
From Data to Knowledge - Profiling & Interlinking Web Datasets
From Data to Knowledge - Profiling & Interlinking Web DatasetsFrom Data to Knowledge - Profiling & Interlinking Web Datasets
From Data to Knowledge - Profiling & Interlinking Web Datasets
 
Ontology Building and its Application using Hozo
Ontology Building and its Application using HozoOntology Building and its Application using Hozo
Ontology Building and its Application using Hozo
 
Link Discovery Tutorial Introduction
Link Discovery Tutorial IntroductionLink Discovery Tutorial Introduction
Link Discovery Tutorial Introduction
 
Retrieval, Crawling and Fusion of Entity-centric Data on the Web
Retrieval, Crawling and Fusion of Entity-centric Data on the WebRetrieval, Crawling and Fusion of Entity-centric Data on the Web
Retrieval, Crawling and Fusion of Entity-centric Data on the Web
 
4th Natural Language Interface over the Web of Data (NLIWoD) workshop and QAL...
4th Natural Language Interface over the Web of Data (NLIWoD) workshop and QAL...4th Natural Language Interface over the Web of Data (NLIWoD) workshop and QAL...
4th Natural Language Interface over the Web of Data (NLIWoD) workshop and QAL...
 

Reflection and Metadata

  • 1.
  • 2. Reflection Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 2 / 10
  • 3. 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
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. Reflection in Object Languages Everything is an object. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 5 / 10
  • 8. Purpose Tools. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 6 / 10
  • 9. 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
  • 10. Metadata Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 12: Reflection and Metadata December 14, 2010 8 / 10
  • 11. 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
  • 12. 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
  • 13. 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
  • 14. 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
  • 15. 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
  • 16. 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
  • 17. 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
  • 18. 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