WorldCIST'14 - The 2014 World Conference on Information Systems and Technologies

Full Program »

Extending the Groovy Language using AST Transformations

Groovy is a dynamic language that allows the easy modification of its own behaviour. A simple mechanism to introduce changes in the core language is by using Abstract Syntax Tree(AST) transformations. In this paper we describe two new features added to Groovy: the introduction of Reification, and the enhancement of Groovy Closures. In the first extension we make it possible for the user to know the types of a generic class during runtime. In the second one, Groovy closures were improved with the addition of two methods: one to provide closures return type and another to give the closure's source code. In addition, we also enabled multiple return values from a closure with type checking capabilities.

Author(s):

Carlos Cortinhas    
Faculdade de Ciências e Tecnologia da Universidade de Coimbra
Portugal

Fernando Barros    
Faculdade de Ciências e Tecnologia da Universidade de Coimbra
Portugal

 

Powered by OpenConf®
Copyright ©2002-2013 Zakon Group LLC