Starting a new DPOR implementation.
[jpf-core.git] / examples / Empty.groovy
index 8d1f87498f2f169193260caa1781cb2e0033b509..e59fa9d476fce32f881989f87b94cd8339b9a7a9 100644 (file)
@@ -1,9 +1,38 @@
 class Empty {
 
-       public static void main(String... args) {
-               /*int rand = Math.random()*10
-               int test = 10;
-               double test2 = 0.0;*/
+       // This function runs when the SmartApp is installed
+       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;
+               println "installed() is called!"
+               boolean thisBoolean = false;
+               initialize(thisBoolean)
+       }
 
+       // This function is where you initialize callbacks for event listeners
+       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 empty = new Empty();
+               //int result = emp.installed();
+               //println result;
+               empty.installed()
+               int x = 5;
+               int y = 6;
+               int result = x + y;
+               println result
+               println "End of call!"
        }       
 }