Introspection support for generic types

In accordance with one embodiment of the present invention, there is provided a technique for supporting introspection of generic types while maintaining migration compatibility. According to one aspect of this technique, in response to an invocation of a programmatic method of a reflective proxy, a...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
1. Verfasser: Darcy, Joseph D
Format: Patent
Sprache:eng
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:In accordance with one embodiment of the present invention, there is provided a technique for supporting introspection of generic types while maintaining migration compatibility. According to one aspect of this technique, in response to an invocation of a programmatic method of a reflective proxy, a string representation of a program element that corresponds to the reflective proxy is generated. The string representation contains information that is based on formal type parameters that are associated with the declaration of the generic type that is associated with the program element. According to another aspect, the programmatic method described above differs from another existing programmatic method "toString( )" that generates a string representation that does not indicate generic type-specific information. Thus, programs that depend upon the existing implementation of the "toString( )" method may continue to use it. According to one embodiment, the "toString( )" method is unchanged, but a method "toGenericString( )" is also implemented.