// Path: src/main/java/com/hubspot/jackson/datatype/protobuf/PropertyNamingStrategyWrapper.java
// @SuppressWarnings("serial")
// public class PropertyNamingStrategyWrapper extends PropertyNamingStrategyBase {
//   private static final PropertyNamingStrategyBase SNAKE_TO_CAMEL = new SnakeToCamelNamingStrategy();
//   private static final PropertyNamingStrategyBase NO_OP = new NoOpNamingStrategy();
// 
//   private final PropertyNamingStrategyBase delegate;
// 
//   public PropertyNamingStrategyWrapper(PropertyNamingStrategy delegate) {
//     if (delegate instanceof PropertyNamingStrategyBase) {
//       this.delegate = (PropertyNamingStrategyBase) delegate;
//     } else if (NamingBaseAdapter.extendsNamingBase(delegate)) {
//       this.delegate = new NamingBaseAdapter(delegate);
//     } else if (delegate == PropertyNamingStrategy.LOWER_CAMEL_CASE) {
//       this.delegate = NO_OP;
//     } else {
//       this.delegate = SNAKE_TO_CAMEL;
//     }
//   }
// 
//   @Override
//   public String translate(String fieldName) {
//     return delegate.translate(fieldName);
//   }
// 
//   private static class SnakeToCamelNamingStrategy extends PropertyNamingStrategyBase {
// 
//     @Override
//     public String translate(String fieldName) {
//       return CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, fieldName);
//     }
// 
//   }
// 
//   private static class NoOpNamingStrategy extends PropertyNamingStrategyBase {
// 
//     @Override
//     public String translate(String fieldName) {
//       return fieldName;
//     }
//   }
// 
//   private static class NamingBaseAdapter extends PropertyNamingStrategyBase {
//     private static final Class<?> NAMING_BASE = tryToLoadNamingBase();
//     private static final Method TRANSLATE_METHOD = tryToLoadTranslateMethod(NAMING_BASE);
// 
//     private final PropertyNamingStrategy delegate;
// 
//     private NamingBaseAdapter(PropertyNamingStrategy delegate) {
//       this.delegate = delegate;
//     }
// 
//     public static boolean extendsNamingBase(PropertyNamingStrategy namingStrategy) {
//       return NAMING_BASE != null && NAMING_BASE.isInstance(namingStrategy);
//     }
// 
//     @Override
//     public String translate(String fieldName) {
//       try {
//         return (String) TRANSLATE_METHOD.invoke(delegate, fieldName);
//       } catch (ReflectiveOperationException e) {
//         throw new RuntimeException("Unable to invoke translate method", e);
//       }
//     }
// 
//     private static Class<?> tryToLoadNamingBase() {
//       try {
//         return Class.forName("com.fasterxml.jackson.databind.PropertyNamingStrategies$NamingBase");
//       } catch (ClassNotFoundException e) {
//         return null;
//       }
//     }
// 
//     private static Method tryToLoadTranslateMethod(Class<?> namingBase) {
//       if (namingBase == null) {
//         return null;
//       } else {
//         try {
//           return namingBase.getMethod("translate", String.class);
//         } catch (NoSuchMethodException e) {
//           throw new RuntimeException("Unable to find translate method on class: " + namingBase);
//         }
//       }
//     }
//   }
// }
// 
// Path: src/main/java/com/hubspot/jackson/datatype/protobuf/ProtobufJacksonConfig.java
// public class ProtobufJacksonConfig {
//   private final ExtensionRegistryWrapper extensionRegistry;
//   private final boolean acceptLiteralFieldnames;
// 
//   private ProtobufJacksonConfig(ExtensionRegistryWrapper extensionRegistry, boolean acceptLiteralFieldnames) {
//     this.extensionRegistry = extensionRegistry;
//     this.acceptLiteralFieldnames = acceptLiteralFieldnames;
//   }
// 
//   public static Builder builder() {
//     return new Builder();
//   }
// 
//   public ExtensionRegistryWrapper extensionRegistry() {
//     return extensionRegistry;
//   }
// 
//   public boolean acceptLiteralFieldnames() {
//     return acceptLiteralFieldnames;
//   }
// 
//   public static class Builder {
//     private ExtensionRegistryWrapper extensionRegistry = ExtensionRegistryWrapper.empty();
//     private boolean acceptLiteralFieldnames = false;
// 
//     private Builder() {}
// 
//     public Builder extensionRegistry(ExtensionRegistry extensionRegistry) {
//       return extensionRegistry(ExtensionRegistryWrapper.wrap(extensionRegistry));
//     }
// 
//     public Builder extensionRegistry(ExtensionRegistryWrapper extensionRegistry) {
//       this.extensionRegistry = extensionRegistry;
//       return this;
//     }
// 
//     public Builder acceptLiteralFieldnames(boolean acceptLiteralFieldnames) {
//       this.acceptLiteralFieldnames = acceptLiteralFieldnames;
//       return this;
//     }
// 
//     public ProtobufJacksonConfig build() {
//       return new ProtobufJacksonConfig(extensionRegistry, acceptLiteralFieldnames);
//     }
//   }
// }


import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.function.Function;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategy.PropertyNamingStrategyBase;
import com.google.common.collect.ImmutableMap;
import com.google.protobuf.Descriptors.Descriptor;
import com.google.protobuf.Descriptors.FieldDescriptor;
import com.hubspot.jackson.datatype.protobuf.PropertyNamingStrategyWrapper;
import com.hubspot.jackson.datatype.protobuf.ProtobufJacksonConfig;
package com.hubspot.jackson.datatype.protobuf.internal;



public class PropertyNamingCache {
  private final Descriptor descriptor;
// Path: src/main/java/com/hubspot/jackson/datatype/protobuf/PropertyNamingStrategyWrapper.java
// @SuppressWarnings("serial")
// public class PropertyNamingStrategyWrapper extends PropertyNamingStrategyBase {
//   private static final PropertyNamingStrategyBase SNAKE_TO_CAMEL = new SnakeToCamelNamingStrategy();
//   private static final PropertyNamingStrategyBase NO_OP = new NoOpNamingStrategy();
// 
//   private final PropertyNamingStrategyBase delegate;
// 
//   public PropertyNamingStrategyWrapper(PropertyNamingStrategy delegate) {
//     if (delegate instanceof PropertyNamingStrategyBase) {
//       this.delegate = (PropertyNamingStrategyBase) delegate;
//     } else if (NamingBaseAdapter.extendsNamingBase(delegate)) {
//       this.delegate = new NamingBaseAdapter(delegate);
//     } else if (delegate == PropertyNamingStrategy.LOWER_CAMEL_CASE) {
//       this.delegate = NO_OP;
//     } else {
//       this.delegate = SNAKE_TO_CAMEL;
//     }
//   }
// 
//   @Override
//   public String translate(String fieldName) {
//     return delegate.translate(fieldName);
//   }
// 
//   private static class SnakeToCamelNamingStrategy extends PropertyNamingStrategyBase {
// 
//     @Override
//     public String translate(String fieldName) {
//       return CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, fieldName);
//     }
// 
//   }
// 
//   private static class NoOpNamingStrategy extends PropertyNamingStrategyBase {
// 
//     @Override
//     public String translate(String fieldName) {
//       return fieldName;
//     }
//   }
// 
//   private static class NamingBaseAdapter extends PropertyNamingStrategyBase {
//     private static final Class<?> NAMING_BASE = tryToLoadNamingBase();
//     private static final Method TRANSLATE_METHOD = tryToLoadTranslateMethod(NAMING_BASE);
// 
//     private final PropertyNamingStrategy delegate;
// 
//     private NamingBaseAdapter(PropertyNamingStrategy delegate) {
//       this.delegate = delegate;
//     }
// 
//     public static boolean extendsNamingBase(PropertyNamingStrategy namingStrategy) {
//       return NAMING_BASE != null && NAMING_BASE.isInstance(namingStrategy);
//     }
// 
//     @Override
//     public String translate(String fieldName) {
//       try {
//         return (String) TRANSLATE_METHOD.invoke(delegate, fieldName);
//       } catch (ReflectiveOperationException e) {
//         throw new RuntimeException("Unable to invoke translate method", e);
//       }
//     }
// 
//     private static Class<?> tryToLoadNamingBase() {
//       try {
//         return Class.forName("com.fasterxml.jackson.databind.PropertyNamingStrategies$NamingBase");
//       } catch (ClassNotFoundException e) {
//         return null;
//       }
//     }
// 
//     private static Method tryToLoadTranslateMethod(Class<?> namingBase) {
//       if (namingBase == null) {
//         return null;
//       } else {
//         try {
//           return namingBase.getMethod("translate", String.class);
//         } catch (NoSuchMethodException e) {
//           throw new RuntimeException("Unable to find translate method on class: " + namingBase);
//         }
//       }
//     }
//   }
// }
// 
// Path: src/main/java/com/hubspot/jackson/datatype/protobuf/ProtobufJacksonConfig.java
// public class ProtobufJacksonConfig {
//   private final ExtensionRegistryWrapper extensionRegistry;
//   private final boolean acceptLiteralFieldnames;
// 
//   private ProtobufJacksonConfig(ExtensionRegistryWrapper extensionRegistry, boolean acceptLiteralFieldnames) {
//     this.extensionRegistry = extensionRegistry;
//     this.acceptLiteralFieldnames = acceptLiteralFieldnames;
//   }
// 
//   public static Builder builder() {
//     return new Builder();
//   }
// 
//   public ExtensionRegistryWrapper extensionRegistry() {
//     return extensionRegistry;
//   }
// 
//   public boolean acceptLiteralFieldnames() {
//     return acceptLiteralFieldnames;
//   }
// 
//   public static class Builder {
//     private ExtensionRegistryWrapper extensionRegistry = ExtensionRegistryWrapper.empty();
//     private boolean acceptLiteralFieldnames = false;
// 
//     private Builder() {}
// 
//     public Builder extensionRegistry(ExtensionRegistry extensionRegistry) {
//       return extensionRegistry(ExtensionRegistryWrapper.wrap(extensionRegistry));
//     }
// 
//     public Builder extensionRegistry(ExtensionRegistryWrapper extensionRegistry) {
//       this.extensionRegistry = extensionRegistry;
//       return this;
//     }
// 
//     public Builder acceptLiteralFieldnames(boolean acceptLiteralFieldnames) {
//       this.acceptLiteralFieldnames = acceptLiteralFieldnames;
//       return this;
//     }
// 
//     public ProtobufJacksonConfig build() {
//       return new ProtobufJacksonConfig(extensionRegistry, acceptLiteralFieldnames);
//     }
//   }
// }


// Path: src/main/java/com/hubspot/jackson/datatype/protobuf/internal/PropertyNamingCache.java
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.function.Function;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategy.PropertyNamingStrategyBase;
import com.google.common.collect.ImmutableMap;
import com.google.protobuf.Descriptors.Descriptor;
import com.google.protobuf.Descriptors.FieldDescriptor;
import com.hubspot.jackson.datatype.protobuf.PropertyNamingStrategyWrapper;
import com.hubspot.jackson.datatype.protobuf.ProtobufJacksonConfig;

package com.hubspot.jackson.datatype.protobuf.internal;



public class PropertyNamingCache {
  private final Descriptor descriptor;
  private final ProtobufJacksonConfig config;