Covariant specialization in Java
Analíticas: Mostrar analíticasTipo de contenido:- texto
- sin mediación
- volumen
Covariant specialization is a form of multiple polymorphism supported by some object-oriented programming languages for overriding a method by varying its parameter types. Particularly useful in frameworks that support dynamic behavior, it is a convenient mechanism in a variety of situations. Although Java does not directly support covariant specialization, it is possible to achieve a similar effect without language extensions by employing Java's rich reflection capabilities while preserving runtime type safety and efficiency. It is shown how this can be done in Java, first providing a practical definition of covariant specialization, then describing the technique via sample code. Finally, applications of covariant specialization and issues encountered in implementing and applying the technique are presented.
No hay comentarios en este titulo.