A trait is a set of methods that is independent from any class hierarchy and can be flexibly used to build other traits or classes by means of a suite of composition operations. Traits were proposed as a mechanism for fine-grained code reuse to overcome many limitations of class-based inheritance. In this paper we present the extended version of Xtraitj, a trait-based programming language that features complete compatibility and interoperability with the Java platform. Xtraitj provides a full Eclipse IDE that aims to support an incremental adoption of traits in existing Java projects. This new version fully supports Java generics: traits can have type parameters just like in Java, so that they can completely interoperate with any existing Java library. Furthermore, Xtraitj now supports Java annotations, so that it can integrate with frameworks like JUnit 4.
Generic traits for the Java platform / Lorenzo Bettini; Ferruccio Damiani. - STAMPA. - (2014), pp. 5-16. ( International Conference on Principles and Practices of Programming on the Java platform: Virtual machines, Languages, and Tools (PPPJ'14) Cracow, Poland September 23-26, 2014) [10.1145/2647508.2647518].
Generic traits for the Java platform
BETTINI, LORENZO;
2014
Abstract
A trait is a set of methods that is independent from any class hierarchy and can be flexibly used to build other traits or classes by means of a suite of composition operations. Traits were proposed as a mechanism for fine-grained code reuse to overcome many limitations of class-based inheritance. In this paper we present the extended version of Xtraitj, a trait-based programming language that features complete compatibility and interoperability with the Java platform. Xtraitj provides a full Eclipse IDE that aims to support an incremental adoption of traits in existing Java projects. This new version fully supports Java generics: traits can have type parameters just like in Java, so that they can completely interoperate with any existing Java library. Furthermore, Xtraitj now supports Java annotations, so that it can integrate with frameworks like JUnit 4.I documenti in FLORE sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.



