svn-gvsig-desktop / tags / v1_9_Build_1245 / docs / Andami / andami-api / com / iver / andami / plugins / PluginClassLoader.html @ 40287
History | View | Annotate | Download (14 KB)
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.4.2_04) on Fri May 13 11:46:18 CEST 2005 -->
|
6 |
<TITLE>
|
7 |
PluginClassLoader |
8 |
</TITLE>
|
9 |
|
10 |
<META NAME="keywords" CONTENT="com.iver.andami.plugins.PluginClassLoader class"> |
11 |
|
12 |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
13 |
|
14 |
<SCRIPT type="text/javascript"> |
15 |
function windowTitle() |
16 |
{ |
17 |
parent.document.title="PluginClassLoader"; |
18 |
} |
19 |
</SCRIPT>
|
20 |
|
21 |
</HEAD>
|
22 |
|
23 |
<BODY BGCOLOR="white" onload="windowTitle();"> |
24 |
|
25 |
|
26 |
<!-- ========= START OF TOP NAVBAR ======= -->
|
27 |
<A NAME="navbar_top"><!-- --></A> |
28 |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
29 |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
30 |
<TR>
|
31 |
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
32 |
<A NAME="navbar_top_firstrow"><!-- --></A> |
33 |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
34 |
<TR ALIGN="center" VALIGN="top"> |
35 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
36 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
37 |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
38 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PluginClassLoader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
39 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
40 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
41 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
42 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
43 |
</TR>
|
44 |
</TABLE>
|
45 |
</TD>
|
46 |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
47 |
</EM>
|
48 |
</TD>
|
49 |
</TR>
|
50 |
|
51 |
<TR>
|
52 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
53 |
PREV CLASS |
54 |
NEXT CLASS</FONT></TD> |
55 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
56 |
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> |
57 |
<A HREF="PluginClassLoader.html" target="_top"><B>NO FRAMES</B></A> |
58 |
<SCRIPT type="text/javascript"> |
59 |
<!--
|
60 |
if(window==top) {
|
61 |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
62 |
}
|
63 |
//-->
|
64 |
</SCRIPT>
|
65 |
<NOSCRIPT>
|
66 |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
67 |
</NOSCRIPT>
|
68 |
|
69 |
</FONT></TD> |
70 |
</TR>
|
71 |
<TR>
|
72 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
73 |
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
74 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
75 |
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
76 |
</TR>
|
77 |
</TABLE>
|
78 |
<A NAME="skip-navbar_top"></A> |
79 |
<!-- ========= END OF TOP NAVBAR ========= -->
|
80 |
|
81 |
<HR>
|
82 |
<!-- ======== START OF CLASS DATA ======== -->
|
83 |
<H2>
|
84 |
<FONT SIZE="-1"> |
85 |
com.iver.andami.plugins</FONT>
|
86 |
<BR>
|
87 |
Class PluginClassLoader</H2>
|
88 |
<PRE>
|
89 |
java.lang.Object |
90 |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by">java.lang.ClassLoader |
91 |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by">java.security.SecureClassLoader |
92 |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by">java.net.URLClassLoader |
93 |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>com.iver.andami.plugins.PluginClassLoader</B> |
94 |
</PRE>
|
95 |
<HR>
|
96 |
<DL>
|
97 |
<DT>public class <B>PluginClassLoader</B><DT>extends java.net.URLClassLoader</DL> |
98 |
|
99 |
<P>
|
100 |
Class loader que carga las clases pedidas por los plugins de manera que |
101 |
primero busca en el classpath, luego busca en el directorio del propio |
102 |
plugin en los jars especificados por el xml y en caso de no encontrar la |
103 |
clase pide al PluginClassLoaderManager la lista de plugins que pueden |
104 |
satisfacer la clase e intenta cargarlo con cada un de ellos hasta que lo |
105 |
consigue con uno. |
106 |
<P>
|
107 |
|
108 |
<P>
|
109 |
<DL>
|
110 |
<DT><B>Author:</B></DT> |
111 |
<DD>Fernando Gonz?lez Cort?s</DD> |
112 |
</DL>
|
113 |
<HR>
|
114 |
|
115 |
<P>
|
116 |
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
117 |
|
118 |
|
119 |
<!-- =========== FIELD SUMMARY =========== -->
|
120 |
|
121 |
|
122 |
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
123 |
|
124 |
<A NAME="constructor_summary"><!-- --></A> |
125 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
126 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
127 |
<TD COLSPAN=2><FONT SIZE="+2"> |
128 |
<B>Constructor Summary</B></FONT></TD> |
129 |
</TR>
|
130 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
131 |
<TD><CODE><B><A HREF="../../../../com/iver/andami/plugins/PluginClassLoader.html#PluginClassLoader(java.net.URL[], java.lang.String, java.lang.ClassLoader, com.iver.andami.plugins.PluginClassLoader[])">PluginClassLoader</A></B>(java.net.URL[] jars, |
132 |
java.lang.String baseDir,
|
133 |
java.lang.ClassLoader cl,
|
134 |
<A HREF="../../../../com/iver/andami/plugins/PluginClassLoader.html" title="class in com.iver.andami.plugins">PluginClassLoader</A>[] pluginLoaders)</CODE> |
135 |
|
136 |
<BR>
|
137 |
Creates a new PluginClassLoader object.</TD> |
138 |
</TR>
|
139 |
</TABLE>
|
140 |
|
141 |
<!-- ========== METHOD SUMMARY =========== -->
|
142 |
|
143 |
<A NAME="method_summary"><!-- --></A> |
144 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
145 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
146 |
<TD COLSPAN=2><FONT SIZE="+2"> |
147 |
<B>Method Summary</B></FONT></TD> |
148 |
</TR>
|
149 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
150 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
151 |
<CODE> java.lang.String</CODE></FONT></TD> |
152 |
<TD><CODE><B><A HREF="../../../../com/iver/andami/plugins/PluginClassLoader.html#getBaseDir()">getBaseDir</A></B>()</CODE> |
153 |
|
154 |
<BR>
|
155 |
DOCUMENT ME!</TD> |
156 |
</TR>
|
157 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
158 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
159 |
<CODE> java.lang.String</CODE></FONT></TD> |
160 |
<TD><CODE><B><A HREF="../../../../com/iver/andami/plugins/PluginClassLoader.html#getPluginName()">getPluginName</A></B>()</CODE> |
161 |
|
162 |
<BR>
|
163 |
Devuelve el nombre del directorio del plugin</TD> |
164 |
</TR>
|
165 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
166 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
167 |
<CODE> java.net.URL</CODE></FONT></TD> |
168 |
<TD><CODE><B><A HREF="../../../../com/iver/andami/plugins/PluginClassLoader.html#getResource(java.lang.String)">getResource</A></B>(java.lang.String res)</CODE> |
169 |
|
170 |
<BR>
|
171 |
Obtiene los recursos tomando como la raiz el directorio base del plugin. |
172 |
</TD>
|
173 |
</TR>
|
174 |
</TABLE>
|
175 |
<A NAME="methods_inherited_from_class_java.net.URLClassLoader"><!-- --></A> |
176 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
177 |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
178 |
<TD><B>Methods inherited from class java.net.URLClassLoader</B></TD> |
179 |
</TR>
|
180 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
181 |
<TD><CODE>findResource, findResources, getURLs, newInstance, newInstance</CODE></TD> |
182 |
</TR>
|
183 |
</TABLE>
|
184 |
<A NAME="methods_inherited_from_class_java.lang.ClassLoader"><!-- --></A> |
185 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
186 |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
187 |
<TD><B>Methods inherited from class java.lang.ClassLoader</B></TD> |
188 |
</TR>
|
189 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
190 |
<TD><CODE>clearAssertionStatus, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus</CODE></TD> |
191 |
</TR>
|
192 |
</TABLE>
|
193 |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
194 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
195 |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
196 |
<TD><B>Methods inherited from class java.lang.Object</B></TD> |
197 |
</TR>
|
198 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
199 |
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> |
200 |
</TR>
|
201 |
</TABLE>
|
202 |
|
203 |
<P>
|
204 |
|
205 |
<!-- ============ FIELD DETAIL =========== -->
|
206 |
|
207 |
|
208 |
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
209 |
|
210 |
<A NAME="constructor_detail"><!-- --></A> |
211 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
212 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
213 |
<TD COLSPAN=1><FONT SIZE="+2"> |
214 |
<B>Constructor Detail</B></FONT></TD> |
215 |
</TR>
|
216 |
</TABLE>
|
217 |
|
218 |
<A NAME="PluginClassLoader(java.net.URL[], java.lang.String, java.lang.ClassLoader, com.iver.andami.plugins.PluginClassLoader[])"><!-- --></A><H3> |
219 |
PluginClassLoader</H3>
|
220 |
<PRE>
|
221 |
public <B>PluginClassLoader</B>(java.net.URL[] jars, |
222 |
java.lang.String baseDir,
|
223 |
java.lang.ClassLoader cl,
|
224 |
<A HREF="../../../../com/iver/andami/plugins/PluginClassLoader.html" title="class in com.iver.andami.plugins">PluginClassLoader</A>[] pluginLoaders) |
225 |
throws java.io.IOException</PRE>
|
226 |
<DL>
|
227 |
<DD>Creates a new PluginClassLoader object.
|
228 |
<P>
|
229 |
<DT><B>Parameters:</B><DD><CODE>jars</CODE> - Array con la ruta de los jars en los que buscar? las clases |
230 |
el plugin<DD><CODE>baseDir</CODE> - Directorio base del plugin que se carga. Es en directorio |
231 |
donde se buscan los resources en el m?todo getResources<DD><CODE>cl</CODE> - ClassLoader padre del classLoader, al que se le pedir? |
232 |
resolver las clases antes de utilizar el algoritmo propio<DD><CODE>pluginLoaders</CODE> - DOCUMENT ME! |
233 |
<DT><B>Throws:</B> |
234 |
<DD><CODE>java.io.IOException</CODE> |
235 |
<DD><CODE>java.io.IOException</CODE></DL> |
236 |
|
237 |
<!-- ============ METHOD DETAIL ========== -->
|
238 |
|
239 |
<A NAME="method_detail"><!-- --></A> |
240 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
241 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
242 |
<TD COLSPAN=1><FONT SIZE="+2"> |
243 |
<B>Method Detail</B></FONT></TD> |
244 |
</TR>
|
245 |
</TABLE>
|
246 |
|
247 |
<A NAME="getResource(java.lang.String)"><!-- --></A><H3> |
248 |
getResource</H3>
|
249 |
<PRE>
|
250 |
public java.net.URL <B>getResource</B>(java.lang.String res)</PRE> |
251 |
<DL>
|
252 |
<DD>Obtiene los recursos tomando como la raiz el directorio base del plugin.
|
253 |
Si no se encuentra el recurso ah? se invoca a getResource del |
254 |
classloader padre, que buscar? en el jar de la aplicaci?n. Si ah? |
255 |
tampoco se encuentra nada se devolver? null. |
256 |
<P>
|
257 |
<DD><DL> |
258 |
<DT><B>Parameters:</B><DD><CODE>res</CODE> - Nombre del recurso |
259 |
<DT><B>Returns:</B><DD>URL del recurso o null si no se pudo encontrar</DL> |
260 |
</DD>
|
261 |
</DL>
|
262 |
<HR>
|
263 |
|
264 |
<A NAME="getPluginName()"><!-- --></A><H3> |
265 |
getPluginName</H3>
|
266 |
<PRE>
|
267 |
public java.lang.String <B>getPluginName</B>()</PRE> |
268 |
<DL>
|
269 |
<DD>Devuelve el nombre del directorio del plugin
|
270 |
<P>
|
271 |
<DD><DL> |
272 |
|
273 |
<DT><B>Returns:</B><DD></DL> |
274 |
</DD>
|
275 |
</DL>
|
276 |
<HR>
|
277 |
|
278 |
<A NAME="getBaseDir()"><!-- --></A><H3> |
279 |
getBaseDir</H3>
|
280 |
<PRE>
|
281 |
public java.lang.String <B>getBaseDir</B>()</PRE> |
282 |
<DL>
|
283 |
<DD>DOCUMENT ME!
|
284 |
<P>
|
285 |
<DD><DL> |
286 |
|
287 |
<DT><B>Returns:</B><DD>Returns the baseDir.</DL> |
288 |
</DD>
|
289 |
</DL>
|
290 |
<!-- ========= END OF CLASS DATA ========= -->
|
291 |
<HR>
|
292 |
|
293 |
|
294 |
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
295 |
<A NAME="navbar_bottom"><!-- --></A> |
296 |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
297 |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
298 |
<TR>
|
299 |
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
300 |
<A NAME="navbar_bottom_firstrow"><!-- --></A> |
301 |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
302 |
<TR ALIGN="center" VALIGN="top"> |
303 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
304 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
305 |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
306 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PluginClassLoader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
307 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
308 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
309 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
310 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
311 |
</TR>
|
312 |
</TABLE>
|
313 |
</TD>
|
314 |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
315 |
</EM>
|
316 |
</TD>
|
317 |
</TR>
|
318 |
|
319 |
<TR>
|
320 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
321 |
PREV CLASS |
322 |
NEXT CLASS</FONT></TD> |
323 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
324 |
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> |
325 |
<A HREF="PluginClassLoader.html" target="_top"><B>NO FRAMES</B></A> |
326 |
<SCRIPT type="text/javascript"> |
327 |
<!--
|
328 |
if(window==top) {
|
329 |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
330 |
}
|
331 |
//-->
|
332 |
</SCRIPT>
|
333 |
<NOSCRIPT>
|
334 |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
335 |
</NOSCRIPT>
|
336 |
|
337 |
</FONT></TD> |
338 |
</TR>
|
339 |
<TR>
|
340 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
341 |
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
342 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
343 |
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
344 |
</TR>
|
345 |
</TABLE>
|
346 |
<A NAME="skip-navbar_bottom"></A> |
347 |
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
348 |
|
349 |
<HR>
|
350 |
|
351 |
</BODY>
|
352 |
</HTML>
|