X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=examples%2FEmpty.groovy;h=e59fa9d476fce32f881989f87b94cd8339b9a7a9;hb=9adeb9b41d1ca24612350f1b055af8d9e0f65e8b;hp=1b7beeb64134a756dd93fe2b24c6690167c1002e;hpb=4387122a51c4c2268f8aa1907f313446a479bcc6;p=jpf-core.git diff --git a/examples/Empty.groovy b/examples/Empty.groovy index 1b7beeb..e59fa9d 100644 --- a/examples/Empty.groovy +++ b/examples/Empty.groovy @@ -4,25 +4,35 @@ class Empty { def installed() { // This is a standard debug statement in Groovy //log.debug "Installed with settings: ${settings}" - int x = 5; - int y = 6; - int result = x + y; - return result; - //initialize() + //int x = 5; + //int y = 6; + //int result = x + y; + //return result; + println "installed() is called!" + boolean thisBoolean = false; + initialize(thisBoolean) } // This function is where you initialize callbacks for event listeners - //def initialize() { + def initialize(thisBoolean) { // The subscribe function takes a input, a state, and a callback method //subscribe(contact, "contact.open", openHandler) //subscribe(contact, "contact.closed", closedHandler) - //} + thisBoolean = true; + println "Boolean is now " + thisBoolean + println "initialize() is called!" + } static void main(String[] args) { - //Empty emp = new Empty(); + Empty empty = new Empty(); //int result = emp.installed(); //println result; - println "Test" + empty.installed() + int x = 5; + int y = 6; + int result = x + y; + println result + println "End of call!" } }