package com.hubspot.rosetta.jackson;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.cfg.MapperConfig;
import com.fasterxml.jackson.databind.introspect.AnnotatedField;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
import com.fasterxml.jackson.databind.introspect.AnnotatedMethod;
import com.hubspot.rosetta.ColumnName;

public class RosettaNamingStrategy extends PropertyNamingStrategy {

  private static final long serialVersionUID = 1L;

  @Override
  public String nameForField(MapperConfig<?> config, AnnotatedField field, String defaultName) {
    return convert(field, defaultName);
  }

  @Override
  public String nameForGetterMethod(MapperConfig<?> config, AnnotatedMethod getter, String defaultName) {
    return convert(getter, defaultName);
  }

  @Override
  public String nameForSetterMethod(MapperConfig<?> config, AnnotatedMethod setter, String defaultName) {
    return convert(setter, defaultName);
 }

  private String convert(AnnotatedMember member, String defaultName) {
    ColumnName ann = member.getAnnotation(ColumnName.class);
    if (ann != null) {
      return ann.value();
    }
    return defaultName;
  }

}

@@ -346,16 +346,85 @@
 Method;%0A
+import com.fasterxml.jackson.databind.introspect.AnnotatedParameter;%0A
 import c
@@ -1053,16 +1053,190 @@
 tName);%0A
+  %7D%0A%0A  @Override%0A  public String nameForConstructorParameter(MapperConfig%3C?%3E config, AnnotatedParameter param, String defaultName) %7B%0A    return convert(param, defaultName);%0A 
  %7D%0A%0A  pr

Support @ColumnName on Constructor params.