PageRenderTime 66ms CodeModel.GetById 45ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/ServiceManager.html

#
HTML | 468 lines | 402 code | 53 blank | 13 comment | 0 complexity | 1b673ad43530cac4cadaa4cbf683fa0c MD5 | raw file
  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.5.0_14) on Tue Jul 22 07:13:46 GMT-08:00 2008 -->
  6<TITLE>
  7ServiceManager (jEdit API)
  8</TITLE>
  9
 10<META NAME="keywords" CONTENT="org.gjt.sp.jedit.ServiceManager class">
 11
 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
 13
 14
 15<NOSCRIPT>
 16</NOSCRIPT>
 17
 18</HEAD>
 19
 20<BODY BGCOLOR="white" >
 21
 22
 23<!-- ========= START OF TOP NAVBAR ======= -->
 24<A NAME="navbar_top"><!-- --></A>
 25<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 26<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 27<TR>
 28<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 29<A NAME="navbar_top_firstrow"><!-- --></A>
 30<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 31  <TR ALIGN="center" VALIGN="top">
 32  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 33  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 34  <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 35  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ServiceManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 36  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 38  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 39  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 40  </TR>
 41</TABLE>
 42</TD>
 43<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 44</EM>
 45</TD>
 46</TR>
 47
 48<TR>
 49<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 50&nbsp;<A HREF="../../../../org/gjt/sp/jedit/RegistersListener.html" title="interface in org.gjt.sp.jedit"><B>PREV CLASS</B></A>&nbsp;
 51&nbsp;<A HREF="../../../../org/gjt/sp/jedit/ServiceManager.ServiceFoldHandlerProvider.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
 52<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 53  <A HREF="../../../../index.html?org/gjt/sp/jedit/ServiceManager.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 54&nbsp;<A HREF="ServiceManager.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 55&nbsp;
 56<NOSCRIPT>
 57  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
 58</NOSCRIPT>
 59
 60
 61</FONT></TD>
 62</TR>
 63<TR>
 64<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 65  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 66<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 67DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 68</TR>
 69</TABLE>
 70<A NAME="skip-navbar_top"></A>
 71<!-- ========= END OF TOP NAVBAR ========= -->
 72
 73<HR>
 74<!-- ======== START OF CLASS DATA ======== -->
 75<H2>
 76<FONT SIZE="-1">
 77org.gjt.sp.jedit</FONT>
 78<BR>
 79Class ServiceManager</H2>
 80<PRE>
 81java.lang.Object
 82  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.ServiceManager</B>
 83</PRE>
 84<HR>
 85<DL>
 86<DT><PRE>public class <B>ServiceManager</B><DT>extends java.lang.Object</DL>
 87</PRE>
 88
 89<P>
 90A generic way for plugins to provide various API extensions.<p>
 91
 92 Services are loaded from files named <code>services.xml</code> inside the
 93 plugin JAR. A service definition file has the following form:
 94
 95 <pre>&lt;?xml version="1.0"?&gt;
 96&lt;!DOCTYPE SERVICES SYSTEM "services.dtd"&gt;
 97&lt;SERVICES&gt;
 98    &lt;SERVICE NAME="service name" CLASS="fully qualified class name"&gt;
 99        // BeanShell code evaluated when the sevice is first activated
100    &lt;/SERVICE&gt;
101&lt;/SERVICES&gt;</pre>
102
103 The following elements are valid:
104
105 <ul>
106 <li>
107 <code>SERVICES</code> is the top-level element and refers
108 to the set of services offered by the plugin.
109 </li>
110 <li>
111 A <code>SERVICE</code> contains the data for a particular service
112 activation.
113 It has two attributes, both required: <code>NAME</code> and
114 <code>CLASS</code>. The <code>CLASS</code> attribute must be the name of
115 a known sevice type; see below.
116 </li>
117 <li>
118 A <code>SERVICE</code> element should the BeanShell code that returns a
119 new instance of the named class. Note that this code can return
120 <code>null</code>.
121 </li>
122 </ul>
123
124 The jEdit core defines the following service types:
125 <ul>
126 <li><A HREF="../../../../org/gjt/sp/jedit/buffer/FoldHandler.html" title="class in org.gjt.sp.jedit.buffer"><CODE>FoldHandler</CODE></A></li>
127 <li><A HREF="../../../../org/gjt/sp/jedit/io/VFS.html" title="class in org.gjt.sp.jedit.io"><CODE>VFS</CODE></A></li>
128 <li><A HREF="../../../../org/gjt/sp/jedit/io/Encoding.html" title="interface in org.gjt.sp.jedit.io"><CODE>Encoding</CODE></A></li>
129 <li><A HREF="../../../../org/gjt/sp/jedit/io/EncodingDetector.html" title="interface in org.gjt.sp.jedit.io"><CODE>EncodingDetector</CODE></A></li>
130 </ul>
131
132 Plugins may provide more.<p>
133
134 To have your plugin accept services, no extra steps are needed other than
135 a piece of code somewhere that calls <A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getServiceNames(java.lang.String)"><CODE>getServiceNames(String)</CODE></A> and
136 <A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getService(java.lang.String, java.lang.String)"><CODE>getService(String,String)</CODE></A>.
137<P>
138
139<P>
140<DL>
141<DT><B>Since:</B></DT>
142  <DD>jEdit 4.2pre1</DD>
143<DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html" title="class in org.gjt.sp.jedit"><CODE>BeanShell</CODE></A>, 
144<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit"><CODE>PluginJAR</CODE></A></DL>
145<HR>
146
147<P>
148<!-- ======== NESTED CLASS SUMMARY ======== -->
149
150<A NAME="nested_class_summary"><!-- --></A>
151<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
152<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
153<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
154<B>Nested Class Summary</B></FONT></TH>
155</TR>
156<TR BGCOLOR="white" CLASS="TableRowColor">
157<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158<CODE>static&nbsp;class</CODE></FONT></TD>
159<TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.ServiceFoldHandlerProvider.html" title="class in org.gjt.sp.jedit">ServiceManager.ServiceFoldHandlerProvider</A></B></CODE>
160
161<BR>
162&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A FoldHandler based on the ServiceManager</TD>
163</TR>
164</TABLE>
165&nbsp;
166<!-- ======== CONSTRUCTOR SUMMARY ======== -->
167
168<A NAME="constructor_summary"><!-- --></A>
169<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
170<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
171<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
172<B>Constructor Summary</B></FONT></TH>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#ServiceManager()">ServiceManager</A></B>()</CODE>
176
177<BR>
178&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
179</TR>
180</TABLE>
181&nbsp;
182<!-- ========== METHOD SUMMARY =========== -->
183
184<A NAME="method_summary"><!-- --></A>
185<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
186<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
187<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
188<B>Method Summary</B></FONT></TH>
189</TR>
190<TR BGCOLOR="white" CLASS="TableRowColor">
191<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
193<TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getService(java.lang.String, java.lang.String)">getService</A></B>(java.lang.String&nbsp;clazz,
194           java.lang.String&nbsp;name)</CODE>
195
196<BR>
197&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an instance of the given service.</TD>
198</TR>
199<TR BGCOLOR="white" CLASS="TableRowColor">
200<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
201<CODE>static&nbsp;java.lang.String[]</CODE></FONT></TD>
202<TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getServiceNames(java.lang.String)">getServiceNames</A></B>(java.lang.String&nbsp;clazz)</CODE>
203
204<BR>
205&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the names of all registered services with the given
206 class.</TD>
207</TR>
208<TR BGCOLOR="white" CLASS="TableRowColor">
209<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
210<CODE>static&nbsp;java.lang.String[]</CODE></FONT></TD>
211<TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getServiceTypes()">getServiceTypes</A></B>()</CODE>
212
213<BR>
214&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all known service class types.</TD>
215</TR>
216<TR BGCOLOR="white" CLASS="TableRowColor">
217<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
218<CODE>static&nbsp;void</CODE></FONT></TD>
219<TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#loadServices(org.gjt.sp.jedit.PluginJAR, java.net.URL, org.gjt.sp.jedit.PluginJAR.PluginCacheEntry)">loadServices</A></B>(<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin,
220             java.net.URL&nbsp;uri,
221             <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.PluginCacheEntry.html" title="class in org.gjt.sp.jedit">PluginJAR.PluginCacheEntry</A>&nbsp;cache)</CODE>
222
223<BR>
224&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a <code>services.xml</code> file.</TD>
225</TR>
226<TR BGCOLOR="white" CLASS="TableRowColor">
227<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
228<CODE>static&nbsp;void</CODE></FONT></TD>
229<TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#registerService(java.lang.String, java.lang.String, java.lang.String, org.gjt.sp.jedit.PluginJAR)">registerService</A></B>(java.lang.String&nbsp;clazz,
230                java.lang.String&nbsp;name,
231                java.lang.String&nbsp;code,
232                <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin)</CODE>
233
234<BR>
235&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a service.</TD>
236</TR>
237<TR BGCOLOR="white" CLASS="TableRowColor">
238<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
239<CODE>static&nbsp;void</CODE></FONT></TD>
240<TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#unloadServices(org.gjt.sp.jedit.PluginJAR)">unloadServices</A></B>(<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin)</CODE>
241
242<BR>
243&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all services belonging to the specified plugin.</TD>
244</TR>
245<TR BGCOLOR="white" CLASS="TableRowColor">
246<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247<CODE>static&nbsp;void</CODE></FONT></TD>
248<TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#unregisterService(java.lang.String, java.lang.String)">unregisterService</A></B>(java.lang.String&nbsp;clazz,
249                  java.lang.String&nbsp;name)</CODE>
250
251<BR>
252&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregisters a service.</TD>
253</TR>
254</TABLE>
255&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
256<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
257<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
258<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
259</TR>
260<TR BGCOLOR="white" CLASS="TableRowColor">
261<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
262</TR>
263</TABLE>
264&nbsp;
265<P>
266
267<!-- ========= CONSTRUCTOR DETAIL ======== -->
268
269<A NAME="constructor_detail"><!-- --></A>
270<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
271<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
272<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
273<B>Constructor Detail</B></FONT></TH>
274</TR>
275</TABLE>
276
277<A NAME="ServiceManager()"><!-- --></A><H3>
278ServiceManager</H3>
279<PRE>
280public <B>ServiceManager</B>()</PRE>
281<DL>
282</DL>
283
284<!-- ============ METHOD DETAIL ========== -->
285
286<A NAME="method_detail"><!-- --></A>
287<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
288<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
289<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
290<B>Method Detail</B></FONT></TH>
291</TR>
292</TABLE>
293
294<A NAME="loadServices(org.gjt.sp.jedit.PluginJAR, java.net.URL, org.gjt.sp.jedit.PluginJAR.PluginCacheEntry)"><!-- --></A><H3>
295loadServices</H3>
296<PRE>
297public static void <B>loadServices</B>(<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin,
298                                java.net.URL&nbsp;uri,
299                                <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.PluginCacheEntry.html" title="class in org.gjt.sp.jedit">PluginJAR.PluginCacheEntry</A>&nbsp;cache)</PRE>
300<DL>
301<DD>Loads a <code>services.xml</code> file.
302<P>
303<DD><DL>
304<DT><B>Since:</B></DT>
305  <DD>jEdit 4.2pre1</DD>
306</DL>
307</DD>
308</DL>
309<HR>
310
311<A NAME="unloadServices(org.gjt.sp.jedit.PluginJAR)"><!-- --></A><H3>
312unloadServices</H3>
313<PRE>
314public static void <B>unloadServices</B>(<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin)</PRE>
315<DL>
316<DD>Removes all services belonging to the specified plugin.
317<P>
318<DD><DL>
319<DT><B>Parameters:</B><DD><CODE>plugin</CODE> - The plugin<DT><B>Since:</B></DT>
320  <DD>jEdit 4.2pre1</DD>
321</DL>
322</DD>
323</DL>
324<HR>
325
326<A NAME="registerService(java.lang.String, java.lang.String, java.lang.String, org.gjt.sp.jedit.PluginJAR)"><!-- --></A><H3>
327registerService</H3>
328<PRE>
329public static void <B>registerService</B>(java.lang.String&nbsp;clazz,
330                                   java.lang.String&nbsp;name,
331                                   java.lang.String&nbsp;code,
332                                   <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin)</PRE>
333<DL>
334<DD>Registers a service. Plugins should provide a
335 <code>services.xml</code> file instead of calling this directly.
336<P>
337<DD><DL>
338<DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The service class<DD><CODE>name</CODE> - The service name<DD><CODE>code</CODE> - BeanShell code to create an instance of this<DD><CODE>plugin</CODE> - The plugin JAR, or null if this is a built-in service<DT><B>Since:</B></DT>
339  <DD>jEdit 4.2pre1</DD>
340</DL>
341</DD>
342</DL>
343<HR>
344
345<A NAME="unregisterService(java.lang.String, java.lang.String)"><!-- --></A><H3>
346unregisterService</H3>
347<PRE>
348public static void <B>unregisterService</B>(java.lang.String&nbsp;clazz,
349                                     java.lang.String&nbsp;name)</PRE>
350<DL>
351<DD>Unregisters a service.
352<P>
353<DD><DL>
354<DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The service class<DD><CODE>name</CODE> - The service name<DT><B>Since:</B></DT>
355  <DD>jEdit 4.2pre1</DD>
356</DL>
357</DD>
358</DL>
359<HR>
360
361<A NAME="getServiceTypes()"><!-- --></A><H3>
362getServiceTypes</H3>
363<PRE>
364public static java.lang.String[] <B>getServiceTypes</B>()</PRE>
365<DL>
366<DD>Returns all known service class types.
367<P>
368<DD><DL>
369<DT><B>Since:</B></DT>
370  <DD>jEdit 4.2pre1</DD>
371</DL>
372</DD>
373</DL>
374<HR>
375
376<A NAME="getServiceNames(java.lang.String)"><!-- --></A><H3>
377getServiceNames</H3>
378<PRE>
379public static java.lang.String[] <B>getServiceNames</B>(java.lang.String&nbsp;clazz)</PRE>
380<DL>
381<DD>Returns the names of all registered services with the given
382 class. For example, calling this with a parameter of
383 "org.gjt.sp.jedit.io.VFS" returns all known virtual file
384 systems.
385<P>
386<DD><DL>
387<DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The class name<DT><B>Since:</B></DT>
388  <DD>jEdit 4.2pre1</DD>
389</DL>
390</DD>
391</DL>
392<HR>
393
394<A NAME="getService(java.lang.String, java.lang.String)"><!-- --></A><H3>
395getService</H3>
396<PRE>
397public static java.lang.Object <B>getService</B>(java.lang.String&nbsp;clazz,
398                                          java.lang.String&nbsp;name)</PRE>
399<DL>
400<DD>Returns an instance of the given service. The first time this is
401 called for a given service, the BeanShell code is evaluated. The
402 result is cached for future invocations, so in effect services are
403 singletons.
404<P>
405<DD><DL>
406<DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The service class<DD><CODE>name</CODE> - The service name<DT><B>Since:</B></DT>
407  <DD>jEdit 4.2pre1</DD>
408</DL>
409</DD>
410</DL>
411<!-- ========= END OF CLASS DATA ========= -->
412<HR>
413
414
415<!-- ======= START OF BOTTOM NAVBAR ====== -->
416<A NAME="navbar_bottom"><!-- --></A>
417<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
418<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
419<TR>
420<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
421<A NAME="navbar_bottom_firstrow"><!-- --></A>
422<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
423  <TR ALIGN="center" VALIGN="top">
424  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
425  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
426  <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
427  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ServiceManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
428  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
429  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
430  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
431  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
432  </TR>
433</TABLE>
434</TD>
435<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
436</EM>
437</TD>
438</TR>
439
440<TR>
441<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
442&nbsp;<A HREF="../../../../org/gjt/sp/jedit/RegistersListener.html" title="interface in org.gjt.sp.jedit"><B>PREV CLASS</B></A>&nbsp;
443&nbsp;<A HREF="../../../../org/gjt/sp/jedit/ServiceManager.ServiceFoldHandlerProvider.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
444<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
445  <A HREF="../../../../index.html?org/gjt/sp/jedit/ServiceManager.html" target="_top"><B>FRAMES</B></A>  &nbsp;
446&nbsp;<A HREF="ServiceManager.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
447&nbsp;
448<NOSCRIPT>
449  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
450</NOSCRIPT>
451
452
453</FONT></TD>
454</TR>
455<TR>
456<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
457  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
458<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
459DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
460</TR>
461</TABLE>
462<A NAME="skip-navbar_bottom"></A>
463<!-- ======== END OF BOTTOM NAVBAR ======= -->
464
465<HR>
466
467</BODY>
468</HTML>