All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jn.easyjson.gson.bean.fieldnaming.GsonFieldNamingStrategyAdapter Maven / Gradle / Ivy

There is a newer version: 3.2.26
Show newest version
package com.jn.easyjson.gson.bean.fieldnaming;

import com.google.gson.FieldNamingStrategy;
import com.jn.easyjson.core.bean.propertynaming.BeanPropertyNamingPolicy;

import java.lang.reflect.Field;

/**
 * @since 3.2.2
 */
public class GsonFieldNamingStrategyAdapter implements FieldNamingStrategy {
    private BeanPropertyNamingPolicy delegate;

    public GsonFieldNamingStrategyAdapter(BeanPropertyNamingPolicy policy) {
        this.delegate = policy;
    }

    @Override
    public String translateName(Field f) {
        return this.delegate.translateName(f, f.getName());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy