Skip to content

Instantly share code, notes, and snippets.

@axeda
Created May 7, 2014 14:43
Show Gist options
  • Save axeda/a2765e403c0781bd8890 to your computer and use it in GitHub Desktop.
Save axeda/a2765e403c0781bd8890 to your computer and use it in GitHub Desktop.
Class Scaffold
public class MyClass {
// do not put stateful properties in here - I do NOT maintain state
static final MyClass INSTANCE = new MyClass();
final className = "com.axeda.enablement.MyClass"
MyClass()
{
if(MyClass.INSTANCE != null)
{
throw new RuntimeException("There is already an instance of the MyClass. Please use MyClass.INSTANCE to obtain an instance")
}
}
def myFunctionHere(){
"hello Class!"
}
}
return MyClass.INSTANCE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment