Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Pessoa {
- def methodMissing(String name, args){
- println "Foi chamado ${name} com os argumentos ${args}"
- }
- }
- def p = new Pessoa()
- p.andar()
- p.falar("Groovy!")
- //Foi chamado andar com os argumentos []
- //Foi chamado falar com os argumentos [Groovy!]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement