Created
February 7, 2019 08:36
-
-
Save jeantil/5139b96fea7ecd7e88ecfd59dbb19f24 to your computer and use it in GitHub Desktop.
eclipse code template for immutable java messages (akka)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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