@@ -112,8 +112,8 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
112
112
}
113
113
114
114
private static class Model {
115
- private List <Domain > domains = new ArrayList <>();
116
- private String basePackage ;
115
+ private final List <Domain > domains = new ArrayList <>();
116
+ private final String basePackage ;
117
117
118
118
public Model (String basePackage ) {
119
119
this .basePackage = basePackage ;
@@ -149,7 +149,7 @@ public void dumpTo(Path target) {
149
149
}
150
150
151
151
private static class Parser <T extends BaseSpec > {
152
- private Map <String , BiConsumer <T , Object >> processors ;
152
+ private final Map <String , BiConsumer <T , Object >> processors ;
153
153
154
154
public Parser (Map <String , BiConsumer <T , Object >> processors ) {
155
155
this .processors = processors ;
@@ -247,11 +247,11 @@ public TypedSpecParser(boolean inline, Map<String, BiConsumer<T, Object>> extraP
247
247
}
248
248
249
249
private static class Domain extends BaseSpec {
250
- private Model model ;
250
+ private final Model model ;
251
251
252
- private List <TypeSpec > types = new ArrayList <>();
253
- private List <CommandSpec > commands = new ArrayList <>();
254
- private List <EventSpec > events = new ArrayList <>();
252
+ private final List <TypeSpec > types = new ArrayList <>();
253
+ private final List <CommandSpec > commands = new ArrayList <>();
254
+ private final List <EventSpec > events = new ArrayList <>();
255
255
256
256
public Domain (Model model ) {
257
257
this .model = model ;
@@ -794,8 +794,8 @@ public String getMapper() {
794
794
}
795
795
796
796
private static class SimpleType implements IType {
797
- private String name ;
798
- private String type ;
797
+ private final String name ;
798
+ private final String type ;
799
799
800
800
public SimpleType (String name , String type ) {
801
801
this .name = name ;
@@ -1075,9 +1075,9 @@ public String getJavaType() {
1075
1075
1076
1076
private static class ObjectType implements IType {
1077
1077
1078
- private TypedSpec parent ;
1079
- private String name ;
1080
- private List <VariableSpec > properties ;
1078
+ private final TypedSpec parent ;
1079
+ private final String name ;
1080
+ private final List <VariableSpec > properties ;
1081
1081
1082
1082
public ObjectType (TypedSpec parent , String name , List <VariableSpec > properties ) {
1083
1083
this .parent = parent ;
@@ -1225,7 +1225,7 @@ public String getMapper() {
1225
1225
1226
1226
private static class ArrayType implements IType {
1227
1227
private IType itemType ;
1228
- private String name ;
1228
+ private final String name ;
1229
1229
1230
1230
public ArrayType (String name ) {
1231
1231
this .name = name ;
@@ -1310,9 +1310,9 @@ public void parse(Domain domain, Map<String, Object> json) {
1310
1310
}
1311
1311
1312
1312
private static class RefType implements IType {
1313
- private String name ;
1314
- private Domain domain ;
1315
- private String type ;
1313
+ private final String name ;
1314
+ private final Domain domain ;
1315
+ private final String type ;
1316
1316
1317
1317
public RefType (String name , Domain domain , String type ) {
1318
1318
this .name = name ;
0 commit comments