return "\n"+
"@Override\n"+
"public boolean equals(Object o) {\n"+
- "if (this == o) return true;\n"+
- "if (o == null || getClass() != o.getClass()) return false;\n"+
+ "if (this == o) { return true; }\n"+
+ "if (o == null || getClass() != o.getClass()) { return false; }\n"+
format("%s that = (%1$s) o;\n", abstractFQN.getTypeName())+
"return identifier.equals(that.identifier);\n"+
"}\n"+
for (ModuleField moduleField : moduleFields) {
result += format(
- "if (java.util.Objects.deepEquals(%s, other.%1$s) == false) {\n"+
+ "if (!java.util.Objects.deepEquals(%s, other.%1$s)) {\n"+
"return false;\n"+
"}\n", moduleField.getName());
}
private static String getLoggerDefinition(FullyQualifiedName fqn) {
- return format("private static final %s LOGGER = %s.getLogger(%s.class);",
+ return format("private static final %s LOG = %s.getLogger(%s.class);",
Logger.class.getCanonicalName(), LoggerFactory.class.getCanonicalName(), fqn);
}
}
public String getGetLogger() {
- return new MethodDefinition(Logger.class.getCanonicalName(), "getLogger", Collections.<Field>emptyList(), "return LOGGER;").toString();
+ return new MethodDefinition(Logger.class.getCanonicalName(), "getLogger", Collections.<Field>emptyList(), "return LOG;").toString();
}
}