source: branches/objectmq-1.0/lib/rabbitmq-java-client-javadoc-3.0.1/com/rabbitmq/tools/json/JSONUtil.html

Last change on this file was 33, checked in by amoreno, 11 years ago

new release version

File size: 12.6 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_18) on Tue Dec 11 11:47:10 GMT 2012 -->
6<TITLE>
7JSONUtil
8</TITLE>
9
10<META NAME="date" CONTENT="2012-12-11">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="JSONUtil";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
47  </TR>
48</TABLE>
49</TD>
50<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51</EM>
52</TD>
53</TR>
54
55<TR>
56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57&nbsp;<A HREF="../../../../com/rabbitmq/tools/json/JSONSerializable.html" title="interface in com.rabbitmq.tools.json"><B>PREV CLASS</B></A>&nbsp;
58&nbsp;<A HREF="../../../../com/rabbitmq/tools/json/JSONWriter.html" title="class in com.rabbitmq.tools.json"><B>NEXT CLASS</B></A></FONT></TD>
59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60  <A HREF="../../../../index.html?com/rabbitmq/tools/json/JSONUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61&nbsp;<A HREF="JSONUtil.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
62&nbsp;<SCRIPT type="text/javascript">
63  <!--
64  if(window==top) {
65    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66  }
67  //-->
68</SCRIPT>
69<NOSCRIPT>
70  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
71</NOSCRIPT>
72
73
74</FONT></TD>
75</TR>
76<TR>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
81</TR>
82</TABLE>
83<A NAME="skip-navbar_top"></A>
84<!-- ========= END OF TOP NAVBAR ========= -->
85
86<HR>
87<!-- ======== START OF CLASS DATA ======== -->
88<H2>
89<FONT SIZE="-1">
90com.rabbitmq.tools.json</FONT>
91<BR>
92Class JSONUtil</H2>
93<PRE>
94java.lang.Object
95  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.rabbitmq.tools.json.JSONUtil</B>
96</PRE>
97<HR>
98<DL>
99<DT><PRE>public class <B>JSONUtil</B><DT>extends java.lang.Object</DL>
100</PRE>
101
102<P>
103Utility methods for working with JSON objects in Java.
104<P>
105
106<P>
107<HR>
108
109<P>
110
111<!-- ======== CONSTRUCTOR SUMMARY ======== -->
112
113<A NAME="constructor_summary"><!-- --></A>
114<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
115<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
116<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
117<B>Constructor Summary</B></FONT></TH>
118</TR>
119<TR BGCOLOR="white" CLASS="TableRowColor">
120<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/json/JSONUtil.html#JSONUtil()">JSONUtil</A></B>()</CODE>
121
122<BR>
123&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
124</TR>
125</TABLE>
126&nbsp;
127<!-- ========== METHOD SUMMARY =========== -->
128
129<A NAME="method_summary"><!-- --></A>
130<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
131<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
132<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
133<B>Method Summary</B></FONT></TH>
134</TR>
135<TR BGCOLOR="white" CLASS="TableRowColor">
136<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
137<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
138<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/json/JSONUtil.html#fill(java.lang.Object, java.util.Map)">fill</A></B>(java.lang.Object&nbsp;target,
139     java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;source)</CODE>
140
141<BR>
142&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uses reflection to fill public fields and Bean properties of
143 the target object from the source Map.</TD>
144</TR>
145<TR BGCOLOR="white" CLASS="TableRowColor">
146<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
147<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
148<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/json/JSONUtil.html#fill(java.lang.Object, java.util.Map, boolean)">fill</A></B>(java.lang.Object&nbsp;target,
149     java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;source,
150     boolean&nbsp;useProperties)</CODE>
151
152<BR>
153&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uses reflection to fill public fields and optionally Bean
154 properties of the target object from the source Map.</TD>
155</TR>
156<TR BGCOLOR="white" CLASS="TableRowColor">
157<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158<CODE>static&nbsp;void</CODE></FONT></TD>
159<TD><CODE><B><A HREF="../../../../com/rabbitmq/tools/json/JSONUtil.html#tryFill(java.lang.Object, java.util.Map)">tryFill</A></B>(java.lang.Object&nbsp;target,
160        java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;source)</CODE>
161
162<BR>
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ignores reflection exceptions while using reflection to fill
164 public fields and Bean properties of the target object from the
165 source Map.</TD>
166</TR>
167</TABLE>
168&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
169<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
170<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
171<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
172</TR>
173<TR BGCOLOR="white" CLASS="TableRowColor">
174<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
175</TR>
176</TABLE>
177&nbsp;
178<P>
179
180<!-- ========= CONSTRUCTOR DETAIL ======== -->
181
182<A NAME="constructor_detail"><!-- --></A>
183<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
184<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
185<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
186<B>Constructor Detail</B></FONT></TH>
187</TR>
188</TABLE>
189
190<A NAME="JSONUtil()"><!-- --></A><H3>
191JSONUtil</H3>
192<PRE>
193public <B>JSONUtil</B>()</PRE>
194<DL>
195</DL>
196
197<!-- ============ METHOD DETAIL ========== -->
198
199<A NAME="method_detail"><!-- --></A>
200<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
201<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
202<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
203<B>Method Detail</B></FONT></TH>
204</TR>
205</TABLE>
206
207<A NAME="fill(java.lang.Object, java.util.Map)"><!-- --></A><H3>
208fill</H3>
209<PRE>
210public static java.lang.Object <B>fill</B>(java.lang.Object&nbsp;target,
211                                    java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;source)
212                             throws java.beans.IntrospectionException,
213                                    java.lang.IllegalAccessException,
214                                    java.lang.reflect.InvocationTargetException</PRE>
215<DL>
216<DD>Uses reflection to fill public fields and Bean properties of
217 the target object from the source Map.
218<P>
219<DD><DL>
220
221<DT><B>Throws:</B>
222<DD><CODE>java.beans.IntrospectionException</CODE>
223<DD><CODE>java.lang.IllegalAccessException</CODE>
224<DD><CODE>java.lang.reflect.InvocationTargetException</CODE></DL>
225</DD>
226</DL>
227<HR>
228
229<A NAME="fill(java.lang.Object, java.util.Map, boolean)"><!-- --></A><H3>
230fill</H3>
231<PRE>
232public static java.lang.Object <B>fill</B>(java.lang.Object&nbsp;target,
233                                    java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;source,
234                                    boolean&nbsp;useProperties)
235                             throws java.beans.IntrospectionException,
236                                    java.lang.IllegalAccessException,
237                                    java.lang.reflect.InvocationTargetException</PRE>
238<DL>
239<DD>Uses reflection to fill public fields and optionally Bean
240 properties of the target object from the source Map.
241<P>
242<DD><DL>
243
244<DT><B>Throws:</B>
245<DD><CODE>java.beans.IntrospectionException</CODE>
246<DD><CODE>java.lang.IllegalAccessException</CODE>
247<DD><CODE>java.lang.reflect.InvocationTargetException</CODE></DL>
248</DD>
249</DL>
250<HR>
251
252<A NAME="tryFill(java.lang.Object, java.util.Map)"><!-- --></A><H3>
253tryFill</H3>
254<PRE>
255public static void <B>tryFill</B>(java.lang.Object&nbsp;target,
256                           java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;source)</PRE>
257<DL>
258<DD>Ignores reflection exceptions while using reflection to fill
259 public fields and Bean properties of the target object from the
260 source Map.
261<P>
262<DD><DL>
263</DL>
264</DD>
265</DL>
266<!-- ========= END OF CLASS DATA ========= -->
267<HR>
268
269
270<!-- ======= START OF BOTTOM NAVBAR ====== -->
271<A NAME="navbar_bottom"><!-- --></A>
272<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
273<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
274<TR>
275<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
276<A NAME="navbar_bottom_firstrow"><!-- --></A>
277<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
278  <TR ALIGN="center" VALIGN="top">
279  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
280  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
281  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
282  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
283  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
284  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
285  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
286  </TR>
287</TABLE>
288</TD>
289<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
290</EM>
291</TD>
292</TR>
293
294<TR>
295<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
296&nbsp;<A HREF="../../../../com/rabbitmq/tools/json/JSONSerializable.html" title="interface in com.rabbitmq.tools.json"><B>PREV CLASS</B></A>&nbsp;
297&nbsp;<A HREF="../../../../com/rabbitmq/tools/json/JSONWriter.html" title="class in com.rabbitmq.tools.json"><B>NEXT CLASS</B></A></FONT></TD>
298<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
299  <A HREF="../../../../index.html?com/rabbitmq/tools/json/JSONUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
300&nbsp;<A HREF="JSONUtil.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
301&nbsp;<SCRIPT type="text/javascript">
302  <!--
303  if(window==top) {
304    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
305  }
306  //-->
307</SCRIPT>
308<NOSCRIPT>
309  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
310</NOSCRIPT>
311
312
313</FONT></TD>
314</TR>
315<TR>
316<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
317  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
318<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
319DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
320</TR>
321</TABLE>
322<A NAME="skip-navbar_bottom"></A>
323<!-- ======== END OF BOTTOM NAVBAR ======= -->
324
325<HR>
326
327</BODY>
328</HTML>
Note: See TracBrowser for help on using the repository browser.