In the last few years the interest in reflection has grown and many modern programming languages/environments (e.g., Java and. NET) have provided the programmer with reflective mechanisms, i.e., with the ability of dynamically looking into (introspect) the structure of the code from the code itself. In spite of its evident usefulness, reflection has many detractors, who claim that it is too inefficient to be used with real profit. In this work, we have investigated about the performance issue in the context of the Java reflection library and presented a different approach to the introspection in Java that improves its performances. The basic idea of the proposed approach consists of moving most of the overhead due to the dynamic introspection from run-time to compiletime. The efficiency improvement has been proved by providing a new reflection library compliant - that is, it provides exactly the same services -, with the standard Java reflection library based on the proposed approach. This paper is focused on speeding up the reification and the invocation of methods, i.e., on the class SmartMethod that replaces the class Method of the standard reflection library.
|Titolo:||SmartReflection : efficient introspection in Java|
CAZZOLA, WALTER (Primo)
|Parole Chiave:||Introspection; Java; Java Reflection Library; Optimization; Reflection|
|Settore Scientifico Disciplinare:||Settore INF/01 - Informatica|
|Data di pubblicazione:||2004|
|Digital Object Identifier (DOI):||10.5381/jot.2004.3.11.a6|
|Appare nelle tipologie:||01 - Articolo su periodico|