]>
iEval git - unical.git/blob - src/com/google/gson/FieldNamingStrategy.java
2 * Copyright (C) 2008 Google Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com
.google
.gson
;
19 import java
.lang
.reflect
.Field
;
22 * A mechanism for providing custom field naming in Gson. This allows the client code to translate
23 * field names into a particular convention that is not supported as a normal Java field
24 * declaration rules. For example, Java does not support "-" characters in a field name.
26 * @author Inderjeet Singh
30 public interface FieldNamingStrategy
{
33 * Translates the field name into its JSON field name representation.
35 * @param f the field object that we are translating
36 * @return the translated field name.
39 public String
translateName(Field f
);
This page took 0.045027 seconds and 5 git commands to generate.