ProxyBuilder.html revision 0f1cd359d28cd5c6899e0a6bd588735c3f9a7192
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_26) on Tue Jan 03 17:07:49 EST 2012 -->
6<TITLE>
7ProxyBuilder (dexmaker)
8</TITLE>
9
10<META NAME="date" CONTENT="2012-01-03">
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="ProxyBuilder (dexmaker)";
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;PREV CLASS&nbsp;
58&nbsp;NEXT CLASS</FONT></TD>
59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60  <A HREF="/index.html?com/google/dexmaker/stock/ProxyBuilder.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61&nbsp;<A HREF="ProxyBuilder.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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.google.dexmaker.stock</FONT>
91<BR>
92Class ProxyBuilder&lt;T&gt;</H2>
93<PRE>
94java.lang.Object
95  <IMG SRC="/resources/inherit.gif" ALT="extended by "><B>com.google.dexmaker.stock.ProxyBuilder&lt;T&gt;</B>
96</PRE>
97<HR>
98<DL>
99<DT><PRE>public final class <B>ProxyBuilder&lt;T&gt;</B><DT>extends java.lang.Object</DL>
100</PRE>
101
102<P>
103Creates dynamic proxies of concrete classes.
104 <p>
105 This is similar to the <code>java.lang.reflect.Proxy</code> class, but works for classes instead of
106 interfaces.
107 <h3>Example</h3>
108 The following example demonstrates the creation of a dynamic proxy for <code>java.util.Random</code>
109 which will always return 4 when asked for integers, and which logs method calls to every method.
110 <pre>
111 InvocationHandler handler = new InvocationHandler() {
112     &#64;Override
113     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
114         if (method.getName().equals("nextInt")) {
115             // Chosen by fair dice roll, guaranteed to be random.
116             return 4;
117         }
118         Object result = ProxyBuilder.callSuper(proxy, method, args);
119         System.out.println("Method: " + method.getName() + " args: "
120                 + Arrays.toString(args) + " result: " + result);
121         return result;
122     }
123 };
124 Random debugRandom = ProxyBuilder.forClass(Random.class)
125         .dexCache(getInstrumentation().getTargetContext().getDir("dx", Context.MODE_PRIVATE))
126         .handler(handler)
127         .build();
128 assertEquals(4, debugRandom.nextInt());
129 debugRandom.setSeed(0);
130 assertTrue(debugRandom.nextBoolean());
131 </pre>
132 <h3>Usage</h3>
133 Call <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#forClass(java.lang.Class)"><CODE>forClass(Class)</CODE></A> for the Class you wish to proxy. Call
134 <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#handler(java.lang.reflect.InvocationHandler)"><CODE>handler(InvocationHandler)</CODE></A> passing in an <CODE>InvocationHandler</CODE>, and then call
135 <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#build()"><CODE>build()</CODE></A>. The returned instance will be a dynamically generated subclass where all method
136 calls will be delegated to the invocation handler, except as noted below.
137 <p>
138 The static method <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#callSuper(java.lang.Object, java.lang.reflect.Method, java.lang.Object...)"><CODE>callSuper(Object, Method, Object...)</CODE></A> allows you to access the original
139 super method for a given proxy. This allows the invocation handler to selectively override some
140 methods but not others.
141 <p>
142 By default, the <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#build()"><CODE>build()</CODE></A> method will call the no-arg constructor belonging to the class
143 being proxied. If you wish to call a different constructor, you must provide arguments for both
144 <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#constructorArgTypes(java.lang.Class...)"><CODE>constructorArgTypes(Class[])</CODE></A> and <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#constructorArgValues(java.lang.Object...)"><CODE>constructorArgValues(Object[])</CODE></A>.
145 <p>
146 This process works only for classes with public and protected level of visibility.
147 <p>
148 You may proxy abstract classes.  You may not proxy final classes.
149 <p>
150 Only non-private, non-final, non-static methods will be dispatched to the invocation handler.
151 Private, static or final methods will always call through to the superclass as normal.
152 <p>
153 The <CODE>Object.finalize()</CODE> method on <code>Object</code> will not be proxied.
154 <p>
155 You must provide a dex cache directory via the <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#dexCache(java.io.File)"><CODE>dexCache(File)</CODE></A> method. You should take
156 care not to make this a world-writable directory, so that third parties cannot inject code into
157 your application.  A suitable parameter for these output directories would be something like
158 this:
159 <pre><code>getApplicationContext().getDir("dx", Context.MODE_PRIVATE);
160 </code></pre>
161 <p>
162 If the base class to be proxied leaks the <code>this</code> pointer in the constructor (bad practice),
163 that is to say calls a non-private non-final method from the constructor, the invocation handler
164 will not be invoked.  As a simple concrete example, when proxying Random we discover that it
165 inernally calls setSeed during the constructor.  The proxy will not intercept this call during
166 proxy construction, but will intercept as normal afterwards.  This behaviour may be subject to
167 change in future releases.
168 <p>
169 This class is <b>not thread safe</b>.
170<P>
171
172<P>
173<HR>
174
175<P>
176
177<!-- ========== METHOD SUMMARY =========== -->
178
179<A NAME="method_summary"><!-- --></A>
180<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
181<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
182<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
183<B>Method Summary</B></FONT></TH>
184</TR>
185<TR BGCOLOR="white" CLASS="TableRowColor">
186<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187<CODE>&nbsp;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A></CODE></FONT></TD>
188<TD><CODE><B><A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#build()">build</A></B>()</CODE>
189
190<BR>
191&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of the class to proxy.</TD>
192</TR>
193<TR BGCOLOR="white" CLASS="TableRowColor">
194<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
196<TD><CODE><B><A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#callSuper(java.lang.Object, java.lang.reflect.Method, java.lang.Object...)">callSuper</A></B>(java.lang.Object&nbsp;proxy,
197          java.lang.reflect.Method&nbsp;method,
198          java.lang.Object...&nbsp;args)</CODE>
199
200<BR>
201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
202</TR>
203<TR BGCOLOR="white" CLASS="TableRowColor">
204<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205<CODE>&nbsp;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt;</CODE></FONT></TD>
206<TD><CODE><B><A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#constructorArgTypes(java.lang.Class...)">constructorArgTypes</A></B>(java.lang.Class&lt;?&gt;...&nbsp;constructorArgTypes)</CODE>
207
208<BR>
209&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
210</TR>
211<TR BGCOLOR="white" CLASS="TableRowColor">
212<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
213<CODE>&nbsp;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt;</CODE></FONT></TD>
214<TD><CODE><B><A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#constructorArgValues(java.lang.Object...)">constructorArgValues</A></B>(java.lang.Object...&nbsp;constructorArgValues)</CODE>
215
216<BR>
217&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
218</TR>
219<TR BGCOLOR="white" CLASS="TableRowColor">
220<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221<CODE>&nbsp;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt;</CODE></FONT></TD>
222<TD><CODE><B><A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#dexCache(java.io.File)">dexCache</A></B>(java.io.File&nbsp;dexCache)</CODE>
223
224<BR>
225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
226</TR>
227<TR BGCOLOR="white" CLASS="TableRowColor">
228<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229<CODE>static
230<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
231<TR ALIGN="right" VALIGN="">
232<TD NOWRAP><FONT SIZE="-1">
233<CODE>&lt;T&gt; <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;T&gt;</CODE></FONT></TD>
234</TR>
235</TABLE>
236</CODE></FONT></TD>
237<TD><CODE><B><A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#forClass(java.lang.Class)">forClass</A></B>(java.lang.Class&lt;T&gt;&nbsp;clazz)</CODE>
238
239<BR>
240&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
241</TR>
242<TR BGCOLOR="white" CLASS="TableRowColor">
243<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
244<CODE>static&nbsp;java.lang.reflect.InvocationHandler</CODE></FONT></TD>
245<TD><CODE><B><A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#getInvocationHandler(java.lang.Object)">getInvocationHandler</A></B>(java.lang.Object&nbsp;instance)</CODE>
246
247<BR>
248&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the proxy's <CODE>InvocationHandler</CODE>.</TD>
249</TR>
250<TR BGCOLOR="white" CLASS="TableRowColor">
251<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
252<CODE>&nbsp;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt;</CODE></FONT></TD>
253<TD><CODE><B><A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#handler(java.lang.reflect.InvocationHandler)">handler</A></B>(java.lang.reflect.InvocationHandler&nbsp;handler)</CODE>
254
255<BR>
256&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
257</TR>
258<TR BGCOLOR="white" CLASS="TableRowColor">
259<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
260<CODE>&nbsp;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt;</CODE></FONT></TD>
261<TD><CODE><B><A HREF="/com/google/dexmaker/stock/ProxyBuilder.html#parentClassLoader(java.lang.ClassLoader)">parentClassLoader</A></B>(java.lang.ClassLoader&nbsp;parent)</CODE>
262
263<BR>
264&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the parent ClassLoader to use when creating the proxy.</TD>
265</TR>
266</TABLE>
267&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
268<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
269<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
270<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
271</TR>
272<TR BGCOLOR="white" CLASS="TableRowColor">
273<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
274</TR>
275</TABLE>
276&nbsp;
277<P>
278
279<!-- ============ METHOD DETAIL ========== -->
280
281<A NAME="method_detail"><!-- --></A>
282<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
283<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
284<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
285<B>Method Detail</B></FONT></TH>
286</TR>
287</TABLE>
288
289<A NAME="forClass(java.lang.Class)"><!-- --></A><H3>
290forClass</H3>
291<PRE>
292public static &lt;T&gt; <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;T&gt; <B>forClass</B>(java.lang.Class&lt;T&gt;&nbsp;clazz)</PRE>
293<DL>
294<DD><DL>
295</DL>
296</DD>
297</DL>
298<HR>
299
300<A NAME="parentClassLoader(java.lang.ClassLoader)"><!-- --></A><H3>
301parentClassLoader</H3>
302<PRE>
303public <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt; <B>parentClassLoader</B>(java.lang.ClassLoader&nbsp;parent)</PRE>
304<DL>
305<DD>Specifies the parent ClassLoader to use when creating the proxy.
306
307 <p>If null, <code>ProxyBuilder.class.getClassLoader()</code> will be used.
308<P>
309<DD><DL>
310</DL>
311</DD>
312</DL>
313<HR>
314
315<A NAME="handler(java.lang.reflect.InvocationHandler)"><!-- --></A><H3>
316handler</H3>
317<PRE>
318public <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt; <B>handler</B>(java.lang.reflect.InvocationHandler&nbsp;handler)</PRE>
319<DL>
320<DD><DL>
321</DL>
322</DD>
323</DL>
324<HR>
325
326<A NAME="dexCache(java.io.File)"><!-- --></A><H3>
327dexCache</H3>
328<PRE>
329public <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt; <B>dexCache</B>(java.io.File&nbsp;dexCache)</PRE>
330<DL>
331<DD><DL>
332</DL>
333</DD>
334</DL>
335<HR>
336
337<A NAME="constructorArgValues(java.lang.Object...)"><!-- --></A><H3>
338constructorArgValues</H3>
339<PRE>
340public <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt; <B>constructorArgValues</B>(java.lang.Object...&nbsp;constructorArgValues)</PRE>
341<DL>
342<DD><DL>
343</DL>
344</DD>
345</DL>
346<HR>
347
348<A NAME="constructorArgTypes(java.lang.Class...)"><!-- --></A><H3>
349constructorArgTypes</H3>
350<PRE>
351public <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="class in com.google.dexmaker.stock">ProxyBuilder</A>&lt;<A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A>&gt; <B>constructorArgTypes</B>(java.lang.Class&lt;?&gt;...&nbsp;constructorArgTypes)</PRE>
352<DL>
353<DD><DL>
354</DL>
355</DD>
356</DL>
357<HR>
358
359<A NAME="build()"><!-- --></A><H3>
360build</H3>
361<PRE>
362public <A HREF="/com/google/dexmaker/stock/ProxyBuilder.html" title="type parameter in ProxyBuilder">T</A> <B>build</B>()
363        throws java.io.IOException</PRE>
364<DL>
365<DD>Create a new instance of the class to proxy.
366<P>
367<DD><DL>
368
369<DT><B>Throws:</B>
370<DD><CODE>java.lang.UnsupportedOperationException</CODE> - if the class we are trying to create a proxy for is
371     not accessible.
372<DD><CODE>java.io.IOException</CODE> - if an exception occurred writing to the <code>dexCache</code> directory.
373<DD><CODE>java.lang.reflect.UndeclaredThrowableException</CODE> - if the constructor for the base class to proxy throws
374     a declared exception during construction.
375<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the handler is null, if the constructor argument types
376     do not match the constructor argument values, or if no such constructor exists.</DL>
377</DD>
378</DL>
379<HR>
380
381<A NAME="getInvocationHandler(java.lang.Object)"><!-- --></A><H3>
382getInvocationHandler</H3>
383<PRE>
384public static java.lang.reflect.InvocationHandler <B>getInvocationHandler</B>(java.lang.Object&nbsp;instance)</PRE>
385<DL>
386<DD>Returns the proxy's <CODE>InvocationHandler</CODE>.
387<P>
388<DD><DL>
389
390<DT><B>Throws:</B>
391<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the object supplied is not a proxy created by this class.</DL>
392</DD>
393</DL>
394<HR>
395
396<A NAME="callSuper(java.lang.Object, java.lang.reflect.Method, java.lang.Object...)"><!-- --></A><H3>
397callSuper</H3>
398<PRE>
399public static java.lang.Object <B>callSuper</B>(java.lang.Object&nbsp;proxy,
400                                         java.lang.reflect.Method&nbsp;method,
401                                         java.lang.Object...&nbsp;args)
402                                  throws java.lang.SecurityException,
403                                         java.lang.IllegalAccessException,
404                                         java.lang.reflect.InvocationTargetException,
405                                         java.lang.NoSuchMethodException</PRE>
406<DL>
407<DD><DL>
408
409<DT><B>Throws:</B>
410<DD><CODE>java.lang.SecurityException</CODE>
411<DD><CODE>java.lang.IllegalAccessException</CODE>
412<DD><CODE>java.lang.reflect.InvocationTargetException</CODE>
413<DD><CODE>java.lang.NoSuchMethodException</CODE></DL>
414</DD>
415</DL>
416<!-- ========= END OF CLASS DATA ========= -->
417<HR>
418
419
420<!-- ======= START OF BOTTOM NAVBAR ====== -->
421<A NAME="navbar_bottom"><!-- --></A>
422<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
423<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
424<TR>
425<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
426<A NAME="navbar_bottom_firstrow"><!-- --></A>
427<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
428  <TR ALIGN="center" VALIGN="top">
429  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
430  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
431  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
432  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
433  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
434  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
435  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
436  </TR>
437</TABLE>
438</TD>
439<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
440</EM>
441</TD>
442</TR>
443
444<TR>
445<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
446&nbsp;PREV CLASS&nbsp;
447&nbsp;NEXT CLASS</FONT></TD>
448<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
449  <A HREF="/index.html?com/google/dexmaker/stock/ProxyBuilder.html" target="_top"><B>FRAMES</B></A>  &nbsp;
450&nbsp;<A HREF="ProxyBuilder.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
451&nbsp;<SCRIPT type="text/javascript">
452  <!--
453  if(window==top) {
454    document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>');
455  }
456  //-->
457</SCRIPT>
458<NOSCRIPT>
459  <A HREF="/allclasses-noframe.html"><B>All Classes</B></A>
460</NOSCRIPT>
461
462
463</FONT></TD>
464</TR>
465<TR>
466<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
467  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
468<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
469DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
470</TR>
471</TABLE>
472<A NAME="skip-navbar_bottom"></A>
473<!-- ======== END OF BOTTOM NAVBAR ======= -->
474
475<HR>
476
477</BODY>
478</HTML>
479