PageRenderTime 196ms CodeModel.GetById 161ms app.highlight 18ms RepoModel.GetById 12ms app.codeStats 1ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/util/PropertiesBean.html

#
HTML | 331 lines | 278 code | 41 blank | 12 comment | 0 complexity | d4a7a9e219fc19ed518147cd55cc26f4 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:14:16 GMT-08:00 2008 -->
  6<TITLE>
  7PropertiesBean (jEdit API)
  8</TITLE>
  9
 10<META NAME="keywords" CONTENT="org.gjt.sp.util.PropertiesBean 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/PropertiesBean.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/util/ProgressObserver.html" title="interface in org.gjt.sp.util"><B>PREV CLASS</B></A>&nbsp;
 51&nbsp;<A HREF="../../../../org/gjt/sp/util/ReadWriteLock.html" title="class in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
 52<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 53  <A HREF="../../../../index.html?org/gjt/sp/util/PropertiesBean.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 54&nbsp;<A HREF="PropertiesBean.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;NESTED&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.util</FONT>
 78<BR>
 79Class PropertiesBean</H2>
 80<PRE>
 81java.lang.Object
 82  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.util.PropertiesBean</B>
 83</PRE>
 84<HR>
 85<DL>
 86<DT><PRE>public abstract class <B>PropertiesBean</B><DT>extends java.lang.Object</DL>
 87</PRE>
 88
 89<P>
 90A "java bean" that can serialize itself into a java.util.Properties
 91 instance. For the serialization, the class uses the java beans
 92 instrospection mechanism to figure out the class's available
 93 properties, and saves all the properties as strings in the properties
 94 object.
 95
 96 <p>Properties are saved based on a "root", which is set up during the
 97 instantiation of the object. The properties will be set as
 98 <code>root.property_name</code>.</p>
 99
100 <p>Only native types (boolean, char, double, float, int, long, short),
101 Strings, and arrays of those types are supported. Also, nested
102 beans are not supported presently.</p>
103<P>
104
105<P>
106<DL>
107<DT><B>Since:</B></DT>
108  <DD>jEdit 4.3pre7</DD>
109</DL>
110<HR>
111
112<P>
113
114<!-- ======== CONSTRUCTOR SUMMARY ======== -->
115
116<A NAME="constructor_summary"><!-- --></A>
117<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
118<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
119<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
120<B>Constructor Summary</B></FONT></TH>
121</TR>
122<TR BGCOLOR="white" CLASS="TableRowColor">
123<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
124<CODE>protected </CODE></FONT></TD>
125<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#PropertiesBean(java.lang.String)">PropertiesBean</A></B>(java.lang.String&nbsp;root)</CODE>
126
127<BR>
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance with the given root and the default array
129 separator char (':').</TD>
130</TR>
131<TR BGCOLOR="white" CLASS="TableRowColor">
132<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
133<CODE>protected </CODE></FONT></TD>
134<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#PropertiesBean(java.lang.String, char)">PropertiesBean</A></B>(java.lang.String&nbsp;root,
135               char&nbsp;arraysep)</CODE>
136
137<BR>
138&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance with the given root and the given array
139 separator character.</TD>
140</TR>
141</TABLE>
142&nbsp;
143<!-- ========== METHOD SUMMARY =========== -->
144
145<A NAME="method_summary"><!-- --></A>
146<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
147<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
148<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
149<B>Method Summary</B></FONT></TH>
150</TR>
151<TR BGCOLOR="white" CLASS="TableRowColor">
152<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
153<CODE>&nbsp;void</CODE></FONT></TD>
154<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#clean(java.util.Properties)">clean</A></B>(java.util.Properties&nbsp;p)</CODE>
155
156<BR>
157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cleans the entries related to this object from the given object.</TD>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161<CODE>&nbsp;void</CODE></FONT></TD>
162<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#load(java.util.Properties)">load</A></B>(java.util.Properties&nbsp;p)</CODE>
163
164<BR>
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads the bean's properties from the given object.</TD>
166</TR>
167<TR BGCOLOR="white" CLASS="TableRowColor">
168<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
169<CODE>&nbsp;void</CODE></FONT></TD>
170<TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#save(java.util.Properties)">save</A></B>(java.util.Properties&nbsp;p)</CODE>
171
172<BR>
173&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the bean's properties into the given object.</TD>
174</TR>
175</TABLE>
176&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
177<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
178<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
179<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
180</TR>
181<TR BGCOLOR="white" CLASS="TableRowColor">
182<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
183</TR>
184</TABLE>
185&nbsp;
186<P>
187
188<!-- ========= CONSTRUCTOR DETAIL ======== -->
189
190<A NAME="constructor_detail"><!-- --></A>
191<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
192<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
193<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
194<B>Constructor Detail</B></FONT></TH>
195</TR>
196</TABLE>
197
198<A NAME="PropertiesBean(java.lang.String)"><!-- --></A><H3>
199PropertiesBean</H3>
200<PRE>
201protected <B>PropertiesBean</B>(java.lang.String&nbsp;root)</PRE>
202<DL>
203<DD>Creates a new instance with the given root and the default array
204 separator char (':').
205<P>
206<DL>
207<DT><B>Parameters:</B><DD><CODE>root</CODE> - A non-null string that will be the "root" of the
208             serialized properties.</DL>
209</DL>
210<HR>
211
212<A NAME="PropertiesBean(java.lang.String, char)"><!-- --></A><H3>
213PropertiesBean</H3>
214<PRE>
215protected <B>PropertiesBean</B>(java.lang.String&nbsp;root,
216                         char&nbsp;arraysep)</PRE>
217<DL>
218<DD>Creates a new instance with the given root and the given array
219 separator character.
220<P>
221<DL>
222<DT><B>Parameters:</B><DD><CODE>root</CODE> - A non-null string that will be the "root" of the
223             serialized properties.<DD><CODE>arraysep</CODE> - A character that will be used to define the
224                 separator of elements of an array property.</DL>
225</DL>
226
227<!-- ============ METHOD DETAIL ========== -->
228
229<A NAME="method_detail"><!-- --></A>
230<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
231<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
232<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
233<B>Method Detail</B></FONT></TH>
234</TR>
235</TABLE>
236
237<A NAME="load(java.util.Properties)"><!-- --></A><H3>
238load</H3>
239<PRE>
240public void <B>load</B>(java.util.Properties&nbsp;p)</PRE>
241<DL>
242<DD>Loads the bean's properties from the given object.
243<P>
244<DD><DL>
245</DL>
246</DD>
247</DL>
248<HR>
249
250<A NAME="save(java.util.Properties)"><!-- --></A><H3>
251save</H3>
252<PRE>
253public void <B>save</B>(java.util.Properties&nbsp;p)</PRE>
254<DL>
255<DD>Saves the bean's properties into the given object.
256<P>
257<DD><DL>
258</DL>
259</DD>
260</DL>
261<HR>
262
263<A NAME="clean(java.util.Properties)"><!-- --></A><H3>
264clean</H3>
265<PRE>
266public void <B>clean</B>(java.util.Properties&nbsp;p)</PRE>
267<DL>
268<DD>Cleans the entries related to this object from the given object.
269<P>
270<DD><DL>
271</DL>
272</DD>
273</DL>
274<!-- ========= END OF CLASS DATA ========= -->
275<HR>
276
277
278<!-- ======= START OF BOTTOM NAVBAR ====== -->
279<A NAME="navbar_bottom"><!-- --></A>
280<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
281<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
282<TR>
283<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
284<A NAME="navbar_bottom_firstrow"><!-- --></A>
285<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
286  <TR ALIGN="center" VALIGN="top">
287  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
288  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
289  <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
290  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PropertiesBean.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
291  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
292  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
293  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
294  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
295  </TR>
296</TABLE>
297</TD>
298<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
299</EM>
300</TD>
301</TR>
302
303<TR>
304<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
305&nbsp;<A HREF="../../../../org/gjt/sp/util/ProgressObserver.html" title="interface in org.gjt.sp.util"><B>PREV CLASS</B></A>&nbsp;
306&nbsp;<A HREF="../../../../org/gjt/sp/util/ReadWriteLock.html" title="class in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
307<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
308  <A HREF="../../../../index.html?org/gjt/sp/util/PropertiesBean.html" target="_top"><B>FRAMES</B></A>  &nbsp;
309&nbsp;<A HREF="PropertiesBean.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
310&nbsp;
311<NOSCRIPT>
312  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
313</NOSCRIPT>
314
315
316</FONT></TD>
317</TR>
318<TR>
319<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
320  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
321<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
322DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
323</TR>
324</TABLE>
325<A NAME="skip-navbar_bottom"></A>
326<!-- ======== END OF BOTTOM NAVBAR ======= -->
327
328<HR>
329
330</BODY>
331</HTML>