home | career | drupal | java | mac | mysql | perl | scala | uml | unix

Groovy example source code file (Caller.groovy)

This example Groovy source code file (Caller.groovy) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

caller, caller, string, string

The Groovy Caller.groovy source code

package groovy.mock.interceptor

/**
    Helper class for testing.
    @author Dierk Koenig
*/

class Caller {
    int collaborateOne() {
        return new Collaborator().one()
    }
    int collaborateOne(int arg) {
        return new Collaborator().one( arg )
    }
    int collaborateOne(int one, two) {
        return new Collaborator().one( one, two )
    }
    int collaborateTwo() {
        return new Collaborator().two()
    }
    String collaborateJava() {
        return 'whatever'.toString()
    }

    String callFoo1() {
        return new Collaborator().foo
    }
    String callFoo2() {
        return new Collaborator().foo
    }

    void setBar1() {
        new Collaborator().bar = "bar1"
        return
    }

    void setBar2() {
        new Collaborator().setBar("bar2")
        return
    }

}

Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy Caller.groovy source code file:

new blog posts

 

Copyright 1998-2014 Alvin Alexander, alvinalexander.com
All Rights Reserved.