@@ -112,8 +112,8 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
112112 }
113113
114114 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 ;
117117
118118 public Model (String basePackage ) {
119119 this .basePackage = basePackage ;
@@ -149,7 +149,7 @@ public void dumpTo(Path target) {
149149 }
150150
151151 private static class Parser <T extends BaseSpec > {
152- private Map <String , BiConsumer <T , Object >> processors ;
152+ private final Map <String , BiConsumer <T , Object >> processors ;
153153
154154 public Parser (Map <String , BiConsumer <T , Object >> processors ) {
155155 this .processors = processors ;
@@ -247,11 +247,11 @@ public TypedSpecParser(boolean inline, Map<String, BiConsumer<T, Object>> extraP
247247 }
248248
249249 private static class Domain extends BaseSpec {
250- private Model model ;
250+ private final Model model ;
251251
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 <>();
255255
256256 public Domain (Model model ) {
257257 this .model = model ;
@@ -794,8 +794,8 @@ public String getMapper() {
794794 }
795795
796796 private static class SimpleType implements IType {
797- private String name ;
798- private String type ;
797+ private final String name ;
798+ private final String type ;
799799
800800 public SimpleType (String name , String type ) {
801801 this .name = name ;
@@ -1075,9 +1075,9 @@ public String getJavaType() {
10751075
10761076 private static class ObjectType implements IType {
10771077
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 ;
10811081
10821082 public ObjectType (TypedSpec parent , String name , List <VariableSpec > properties ) {
10831083 this .parent = parent ;
@@ -1225,7 +1225,7 @@ public String getMapper() {
12251225
12261226 private static class ArrayType implements IType {
12271227 private IType itemType ;
1228- private String name ;
1228+ private final String name ;
12291229
12301230 public ArrayType (String name ) {
12311231 this .name = name ;
@@ -1310,9 +1310,9 @@ public void parse(Domain domain, Map<String, Object> json) {
13101310 }
13111311
13121312 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 ;
13161316
13171317 public RefType (String name , Domain domain , String type ) {
13181318 this .name = name ;
0 commit comments