docs: @Override
      public void emitHashCode(final Sink sink, final String indent, Constructor constructor) {
      	logger.finest("Generating hashCode() for " + constructor.name);
          sink.write(indent + "@Override\n");
          sink.write(indent + "public int hashCode() {\n");
          if (constructor.args.isEmpty()) {
              sink.write(indent + "    return 0;\n");
          } else {
              sink.write(indent + "    final int prime = 31;\n");
              sink.write(indent + "    int result = 1;\n");
              for (final Arg arg : constructor.args) {
                  arg.type._switch(new Type.SwitchBlock(){
                      @Override
                      public void _case(Ref x) {
                          x.type._switch(new RefType.SwitchBlock() {
                              @Override
                              public void _case(ClassType x) {
                                  sink.write(indent + "    result = prime * result + ((" + arg.name + " == null) ? 0 : " + arg.name + ".hashCode());\n");                
                              }
  
                              @Override
                              public void _case(ArrayType x) {
                                  sink.write(indent + "    result = prime * result + java.util.Arrays.hashCode(" + arg.name + ");\n");                
                              }});
                      }
  
                      @Override
                      public void _case(Primitive x) {
                          x.type._switch(new PrimitiveType.SwitchBlockWithDefault() {
  
                              @Override
                              public void _case(BooleanType x) {
                                  sink.write(indent + "    result = prime * result + (" + arg.name + " ? 1 : 0);\n");
                              }
  
                              @Override
                              public void _case(IntType x) {
                                  uncastedHashChunk(sink, arg);
                              }
  
                              private void uncastedHashChunk(final Sink sink, final Arg arg) {
                                  sink.write(indent + "    result = prime * result + " + arg.name + ";\n");
                              }                            
                              
                              @Override
                              public void _case(ByteType x) {
                                  uncastedHashChunk(sink, arg);
                              }
  
                              @Override
                              public void _case(CharType x) {
                                  uncastedHashChunk(sink, arg);
                              }
  
                              @Override
                              public void _case(ShortType x) {
                                  uncastedHashChunk(sink, arg);
                              }
  
                              @Override
                              public void _default(PrimitiveType x) {
                                  sink.write(indent + "    result = prime * result + (int)" + arg.name + ";\n");
                              }});
                      }});
              }
              sink.write(indent + "    return result;\n");
          }
          sink.write(indent + "}");
      }