Skip to content

Instantly share code, notes, and snippets.

@jeantil
Created February 7, 2019 08:36
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 jeantil/5139b96fea7ecd7e88ecfd59dbb19f24 to your computer and use it in GitHub Desktop.
Save jeantil/5139b96fea7ecd7e88ecfd59dbb19f24 to your computer and use it in GitHub Desktop.
eclipse code template for immutable java messages (akka)
akkam
${is:importStatic(com.google.common.base.Preconditions.checkNotNull)}
public static final class ${messageName}{
private final ${type} ${name:newName(type)};
${cursor}
${messageName}(${type} ${name}){
checkNotNull(${name}, "${name} cannot be null");
this.${name}=${name};
}
public ${type} get${name}(){
return ${name};
}
}
ssm
${is:importStatic(com.google.common.base.Preconditions.checkNotNull)}
public static final class ${messageName}{
public static final ${messageName} Instance= new ${messageName}();
private ${messageName}(){
}
${cursor}
}
actor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment