fixed protected final fields

updated version to 0.1.6
This commit is contained in:
Timo Westkämper 2010-07-15 20:10:56 +00:00
parent dc8a071768
commit 41ef86b5e2
3 changed files with 6 additions and 4 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.mysema.codegen</groupId>
<artifactId>codegen</artifactId>
<version>0.1.5-SNAPSHOT</version>
<version>0.1.6</version>
<name>Codegen</name>
<description>Code generation and compilation for Java</description>
<parent>

View File

@ -72,7 +72,7 @@ public interface CodeWriter extends Appendable{
CodeWriter privateStaticFinal(String type, String name, String value) throws IOException;
CodeWriter protectedField(String type, String name) throws IOException;
CodeWriter protectedFinal(String type, String name) throws IOException;
CodeWriter protectedFinal(String type, String name, String value) throws IOException;

View File

@ -50,6 +50,8 @@ public final class JavaWriter implements Appendable, CodeWriter{
private static final String PRIVATE_STATIC_FINAL = "private static final ";
private static final String PROTECTED = "protected ";
private static final String PROTECTED_FINAL = "protected final ";
private static final String PUBLIC = "public ";
@ -393,12 +395,12 @@ public final class JavaWriter implements Appendable, CodeWriter{
@Override
public JavaWriter protectedFinal(String type, String name) throws IOException {
return field(PROTECTED, type, name);
return field(PROTECTED_FINAL, type, name);
}
@Override
public JavaWriter protectedFinal(String type, String name, String value) throws IOException {
return field(PROTECTED, type, name, value);
return field(PROTECTED_FINAL, type, name, value);
}
@Override