mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
updated version to 0.2.6
This commit is contained in:
parent
8c9fda63d2
commit
57d7f80bcf
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.mysema.codegen</groupId>
|
||||
<artifactId>codegen</artifactId>
|
||||
<version>0.2.5-SNAPSHOT</version>
|
||||
<version>0.2.6</version>
|
||||
<name>Codegen</name>
|
||||
<description>Code generation and compilation for Java</description>
|
||||
<parent>
|
||||
|
||||
@ -50,6 +50,8 @@ public class ScalaWriter extends AbstractCodeWriter<ScalaWriter>{
|
||||
private static final String PUBLIC = "public ";
|
||||
|
||||
private static final String PUBLIC_CLASS = "class ";
|
||||
|
||||
private static final String PUBLIC_OBJECT = "object ";
|
||||
|
||||
private static final String VAR = "var ";
|
||||
|
||||
@ -155,8 +157,14 @@ public class ScalaWriter extends AbstractCodeWriter<ScalaWriter>{
|
||||
return this;
|
||||
}
|
||||
|
||||
public ScalaWriter beginClass(String header) throws IOException{
|
||||
line(PUBLIC_CLASS, header);
|
||||
public ScalaWriter beginObject(String header) throws IOException {
|
||||
line(PUBLIC_OBJECT, header, " {");
|
||||
goIn();
|
||||
return this;
|
||||
}
|
||||
|
||||
public ScalaWriter beginClass(String header) throws IOException {
|
||||
line(PUBLIC_CLASS, header, " {");
|
||||
goIn();
|
||||
return this;
|
||||
}
|
||||
@ -308,7 +316,11 @@ public class ScalaWriter extends AbstractCodeWriter<ScalaWriter>{
|
||||
}
|
||||
}
|
||||
if (rv.endsWith("[]")){
|
||||
return "Array[" + rv.substring(0, rv.length()-2) + "]";
|
||||
rv = rv.substring(0, rv.length()-2);
|
||||
if (classes.contains(rv)){
|
||||
rv = rv.substring(packageName.length()+1);
|
||||
}
|
||||
return "Array[" + rv + "]";
|
||||
}else{
|
||||
return rv;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user