JEE

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Structural Reflection

Can be divided into Structural Introspection and Intercession. Structural introspection is the ability to query about the implementation of its data and code. Structural intercession is the ability to modify or create new data structure and code.

Behavioral Reflection

Can be further divided into Behavioral Introspection and Intercession. Behavioral introspection is the ability of a program to obtain information about its runtime environment. Behavioral intercession is the ability to modify it's runtime environment.

Reification in Java

Java provides reification support by providing an object representation for a class and its methods, constructors, fields, etc. at runtime. In most cases, Java does not support reification for generic types.

Reflection in Java

Limited to introspection which lets you obtain class information about an object at runtime such as fields, methods, modifiers, and the superclass of a class. Intercession is supported in a very limited fashion such as the creating an instance of a class whose name is not known until runtime, invoking methods on such instances, and being able to get and set its fields. However, Java does not allow you to change the data structure at runtime. Meaning you cannot add a new field or method to an object an time. All fields of an object are always determined at compile-time.

What are the categories for Reflection?

Structural Reflection and Behavioural reflection

Intercession

The ability of a program to modify it's execution state, modify its own interpretation or meaning, or add new behaviours to the program it is executing.

Reflection

The ability of a program to query and modify its state "as data" during the execution of the program.

Introspection

The ability of a program to query or obtain information about itself.

Reification

The process of encoding the execution state into data. This is necessary in order to grant a program the ability to query or modify its state. This is necessary for reflection.


Kaugnay na mga set ng pag-aaral

Who, What, When, Where, Why...in German

View Set

Team Dynamics in BLS for healthcare providers

View Set

Week 4: Chapter 12 (Agreement) & 13 (Consideration)

View Set

Chapter 16 Nursing Care of Patients with Integumentary Disorders

View Set