Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. class Pessoa {
  2.  
  3. def methodMissing(String name, args){
  4. println "Foi chamado ${name} com os argumentos ${args}"
  5. }
  6. }
  7.  
  8. def p = new Pessoa()
  9. p.andar()
  10. p.falar("Groovy!")
  11.  
  12. //Foi chamado andar com os argumentos []
  13. //Foi chamado falar com os argumentos [Groovy!]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement