skip to main content
10.1145/967900.968164acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
Article

SmartMethod: an efficient replacement for method

Published:14 March 2004Publication History

ABSTRACT

In the last few years the interest in reflection has grown and many modern programming languages/architectures have provided the programmer with reflective mechanisms. As well as any other novelty also reflection has detractors. They rightly or wrongly accuse reflection to be too inefficient to be used with real profit. In this work, we have investigated about the performance of Java reflection library (especially of the class Method and of its method invoke) and realized a mechanism which improves its performances. Our mechanism consists of a class, named SmartMethod and of a parser contributing to transform reflective invocations into direct call carried out by the standard invocation mechanism of Java. The SmartMethod class is compliant --- that is, it provides exactly the same services ---, with the class Method of the standard Java core reflection library but it provides a more efficient reflective method invocation.

References

  1. K. Arnold and J. Gosling. The Java Programming Language. The Java Series ... from the Source. Addison-Wesley, Reading, Massachusetts, second edition, Dec. 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. W. Cazzola. Remote Method Invocation as a First-Class Citizen. Distributed Computing, 2003. To Appear.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. W. Cazzola. R. J. Stroud, and F. Tisato, editors. Reflection and Software Engineering, volume 1826 of Lecture Notes in Computer Science. Springer-Verlag, Heidelberg, Germany, June 2000.]]Google ScholarGoogle Scholar
  4. S. Chiba. A Meta-Object Protocol for C++. In Proceedings of the 10th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'95), volume 30 of Sigplan Notices, pages 285--299, Austin, Texas, USA, Oct. 1995. ACM.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Chiba. Load-Time Structural Reflection in Java. In E. Bertino, editor, Proceedings of the 14th European Conference on Object-Oriented Programming (ECOOP'2000), LNCS 1850, pages 313--336, Cannes, France, June 2000. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. I. R. Forman and N. B. Forman. Java Reflection. Manning Publications, 2004.]]Google ScholarGoogle Scholar
  7. J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification. The Java Series ... from the Source. Addison-Wesley, Reading, Massachusetts, second edition, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. K. Hoffman, J. Gabriel, D. Gosnell, J. Hasan, C. Holm, E. Musters, J. Narkiewickz, J. Schenken, T. Thangarathinam, S. Wylie, and J. Ortiz. Professional .NET Framework. Wrox Press., 2001.]]Google ScholarGoogle Scholar
  9. S. Liang. Java Native Interface: Programmer's Guide and Specification. The Java Series ... from the Source. Addison-Wesley, Reading, Massachusetts, June 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. Maes. Concepts and Experiments in Computational Reflection. In N. K. Meyrowitz, editor, Proceedings of the 2nd Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'87), volume 22 of Sigplan Notices, pages 147--156, Orlando, Florida, USA, Oct. 1987. ACM.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. H. Masuhara and A. Yonezawa. Design and Partial Evaluation of Meta-objects for a Concurrent Reflective Language. In E. Jul, editor, Proceedings of the 12th European Conference on Object-Oriented Programming (ECOOP'98), LNCS 1445, pages 418--439. Springer-Verlag, July 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Microsoft Corporation. .NET Framework Developer's Guide: Reflection Overview. Technical report, Microsoft Developer Network (MSDN), 2003. http: //msdn.microsoft.com/library/default.asp?url= /library/en-us/cpguid%e/html/cpconreflectionoverview.asp.]]Google ScholarGoogle Scholar
  13. SUN Microsystems. Java#8482; Core Reflection API and Specification. Technical report, SUN Microsystems, Feb. 1997.]]Google ScholarGoogle Scholar
  14. SUN Microsystems. Java#8482; Remote Method Invocation - Distributed Computing for Java. White paper, SUN Microsystems, 1998. Internet Publication - http://www.sun.com.]]Google ScholarGoogle Scholar
  15. A. Yonezawa and S. Matsuoka, editors. Proceedings of 3rd International Conference on Metalevel Architectures and Separation of Crosscutting Concerns (Reflection'2001), volume 2192 of Lecture Notes in Computer Science. Springer-Verlag, Heidelberg, Germany, Sept. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  1. SmartMethod: an efficient replacement for method

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      SAC '04: Proceedings of the 2004 ACM symposium on Applied computing
      March 2004
      1733 pages
      ISBN:1581138121
      DOI:10.1145/967900

      Copyright © 2004 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 14 March 2004

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate1,650of6,669submissions,25%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader