blob: c7ad69519479ef3795cce61128fcaa76d737b6fd [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_23) on Fri Dec 30 23:30:48 PST 2011 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
FieldNamingPolicy (Gson 2.1 API)
</TITLE>
<META NAME="date" CONTENT="2011-12-30">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FieldNamingPolicy (Gson 2.1 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FieldNamingPolicy.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/google/gson/FieldAttributes.html" title="class in com.google.gson"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/google/gson/FieldNamingStrategy.html" title="interface in com.google.gson"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/google/gson/FieldNamingPolicy.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="FieldNamingPolicy.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#enum_constant_summary">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#enum_constant_detail">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.google.gson</FONT>
<BR>
Enum FieldNamingPolicy</H2>
<PRE>
<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</A>&lt;<A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A>&gt;
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.google.gson.FieldNamingPolicy</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../com/google/gson/FieldNamingStrategy.html" title="interface in com.google.gson">FieldNamingStrategy</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A>&lt;<A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A>&gt;</DD>
</DL>
<HR>
<DL>
<DT><PRE>public enum <B>FieldNamingPolicy</B><DT>extends <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;<A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A>&gt;<DT>implements <A HREF="../../../com/google/gson/FieldNamingStrategy.html" title="interface in com.google.gson">FieldNamingStrategy</A></DL>
</PRE>
<P>
An enumeration that defines a few standard naming conventions for JSON field names.
This enumeration should be used in conjunction with <A HREF="../../../com/google/gson/GsonBuilder.html" title="class in com.google.gson"><CODE>GsonBuilder</CODE></A>
to configure a <A HREF="../../../com/google/gson/Gson.html" title="class in com.google.gson"><CODE>Gson</CODE></A> instance to properly translate Java field
names into the desired JSON field names.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Inderjeet Singh, Joel Leitch</DD>
</DL>
<HR>
<P>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<A NAME="enum_constant_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Enum Constant Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/google/gson/FieldNamingPolicy.html#IDENTITY">IDENTITY</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using this naming policy with Gson will ensure that the field name is
unchanged.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/google/gson/FieldNamingPolicy.html#LOWER_CASE_WITH_DASHES">LOWER_CASE_WITH_DASHES</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using this naming policy with Gson will modify the Java Field name from its camel cased
form to a lower case field name where each word is separated by a dash (-).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/google/gson/FieldNamingPolicy.html#LOWER_CASE_WITH_UNDERSCORES">LOWER_CASE_WITH_UNDERSCORES</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using this naming policy with Gson will modify the Java Field name from its camel cased
form to a lower case field name where each word is separated by an underscore (_).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/google/gson/FieldNamingPolicy.html#UPPER_CAMEL_CASE">UPPER_CAMEL_CASE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using this naming policy with Gson will ensure that the first "letter" of the Java
field name is capitalized when serialized to its JSON form.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/google/gson/FieldNamingPolicy.html#UPPER_CAMEL_CASE_WITH_SPACES">UPPER_CAMEL_CASE_WITH_SPACES</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using this naming policy with Gson will ensure that the first "letter" of the Java
field name is capitalized when serialized to its JSON form and the words will be
separated by a space.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/FieldNamingPolicy.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the enum constant of this type with the specified name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/gson/FieldNamingPolicy.html#values()">values</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array containing the constants of this enum type, in
the order they are declared.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Enum"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true#compareTo(E)" title="class or interface in java.lang">compareTo</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass()" title="class or interface in java.lang">getDeclaringClass</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true#name()" title="class or interface in java.lang">name</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true#ordinal()" title="class or interface in java.lang">ordinal</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html?is-external=true#valueOf(java.lang.Class, java.lang.String)" title="class or interface in java.lang">valueOf</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.google.gson.FieldNamingStrategy"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface com.google.gson.<A HREF="../../../com/google/gson/FieldNamingStrategy.html" title="interface in com.google.gson">FieldNamingStrategy</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../com/google/gson/FieldNamingStrategy.html#translateName(java.lang.reflect.Field)">translateName</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ ENUM CONSTANT DETAIL =========== -->
<A NAME="enum_constant_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Enum Constant Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="IDENTITY"><!-- --></A><H3>
IDENTITY</H3>
<PRE>
public static final <A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A> <B>IDENTITY</B></PRE>
<DL>
<DD>Using this naming policy with Gson will ensure that the field name is
unchanged.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="UPPER_CAMEL_CASE"><!-- --></A><H3>
UPPER_CAMEL_CASE</H3>
<PRE>
public static final <A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A> <B>UPPER_CAMEL_CASE</B></PRE>
<DL>
<DD>Using this naming policy with Gson will ensure that the first "letter" of the Java
field name is capitalized when serialized to its JSON form.
<p>Here's a few examples of the form "Java Field Name" ---> "JSON Field Name":</p>
<ul>
<li>someFieldName ---> SomeFieldName</li>
<li>_someFieldName ---> _SomeFieldName</li>
</ul>
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="UPPER_CAMEL_CASE_WITH_SPACES"><!-- --></A><H3>
UPPER_CAMEL_CASE_WITH_SPACES</H3>
<PRE>
public static final <A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A> <B>UPPER_CAMEL_CASE_WITH_SPACES</B></PRE>
<DL>
<DD>Using this naming policy with Gson will ensure that the first "letter" of the Java
field name is capitalized when serialized to its JSON form and the words will be
separated by a space.
<p>Here's a few examples of the form "Java Field Name" ---> "JSON Field Name":</p>
<ul>
<li>someFieldName ---> Some Field Name</li>
<li>_someFieldName ---> _Some Field Name</li>
</ul>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.4</DD>
</DL>
</DL>
<HR>
<A NAME="LOWER_CASE_WITH_UNDERSCORES"><!-- --></A><H3>
LOWER_CASE_WITH_UNDERSCORES</H3>
<PRE>
public static final <A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A> <B>LOWER_CASE_WITH_UNDERSCORES</B></PRE>
<DL>
<DD>Using this naming policy with Gson will modify the Java Field name from its camel cased
form to a lower case field name where each word is separated by an underscore (_).
<p>Here's a few examples of the form "Java Field Name" ---> "JSON Field Name":</p>
<ul>
<li>someFieldName ---> some_field_name</li>
<li>_someFieldName ---> _some_field_name</li>
<li>aStringField ---> a_string_field</li>
<li>aURL ---> a_u_r_l</li>
</ul>
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="LOWER_CASE_WITH_DASHES"><!-- --></A><H3>
LOWER_CASE_WITH_DASHES</H3>
<PRE>
public static final <A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A> <B>LOWER_CASE_WITH_DASHES</B></PRE>
<DL>
<DD>Using this naming policy with Gson will modify the Java Field name from its camel cased
form to a lower case field name where each word is separated by a dash (-).
<p>Here's a few examples of the form "Java Field Name" ---> "JSON Field Name":</p>
<ul>
<li>someFieldName ---> some-field-name</li>
<li>_someFieldName ---> _some-field-name</li>
<li>aStringField ---> a-string-field</li>
<li>aURL ---> a-u-r-l</li>
</ul>
Using dashes in JavaScript is not recommended since dash is also used for a minus sign in
expressions. This requires that a field named with dashes is always accessed as a quoted
property like <code>myobject['my-field']</code>. Accessing it as an object field
<code>myobject.my-field</code> will result in an unintended javascript expression.
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.4</DD>
</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="values()"><!-- --></A><H3>
values</H3>
<PRE>
public static <A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A>[] <B>values</B>()</PRE>
<DL>
<DD>Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
<pre>
for (FieldNamingPolicy c : FieldNamingPolicy.values())
&nbsp; System.out.println(c);
</pre>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an array containing the constants of this enum type, in
the order they are declared</DL>
</DD>
</DL>
<HR>
<A NAME="valueOf(java.lang.String)"><!-- --></A><H3>
valueOf</H3>
<PRE>
public static <A HREF="../../../com/google/gson/FieldNamingPolicy.html" title="enum in com.google.gson">FieldNamingPolicy</A> <B>valueOf</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
<DL>
<DD>Returns the enum constant of this type with the specified name.
The string must match <I>exactly</I> an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the enum constant to be returned.
<DT><B>Returns:</B><DD>the enum constant with the specified name
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if this enum type has no constant
with the specified name
<DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if the argument is null</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FieldNamingPolicy.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/google/gson/FieldAttributes.html" title="class in com.google.gson"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/google/gson/FieldNamingStrategy.html" title="interface in com.google.gson"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/google/gson/FieldNamingPolicy.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="FieldNamingPolicy.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#enum_constant_summary">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#enum_constant_detail">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2008-2011 <a href="http://www.google.com">Google, Inc.</a>. All Rights Reserved.
</BODY>
</HTML>