PageRenderTime 28ms CodeModel.GetById 0ms RepoModel.GetById 0ms 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
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  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>
  7. PropertiesBean (jEdit API)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.gjt.sp.util.PropertiesBean class">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  11. <NOSCRIPT>
  12. </NOSCRIPT>
  13. </HEAD>
  14. <BODY BGCOLOR="white" >
  15. <!-- ========= START OF TOP NAVBAR ======= -->
  16. <A NAME="navbar_top"><!-- --></A>
  17. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  18. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  19. <TR>
  20. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  21. <A NAME="navbar_top_firstrow"><!-- --></A>
  22. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  23. <TR ALIGN="center" VALIGN="top">
  24. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  25. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  26. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  27. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PropertiesBean.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  28. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  29. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  30. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  31. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  32. </TR>
  33. </TABLE>
  34. </TD>
  35. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  36. </EM>
  37. </TD>
  38. </TR>
  39. <TR>
  40. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  41. &nbsp;<A HREF="../../../../org/gjt/sp/util/ProgressObserver.html" title="interface in org.gjt.sp.util"><B>PREV CLASS</B></A>&nbsp;
  42. &nbsp;<A HREF="../../../../org/gjt/sp/util/ReadWriteLock.html" title="class in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
  43. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  44. <A HREF="../../../../index.html?org/gjt/sp/util/PropertiesBean.html" target="_top"><B>FRAMES</B></A> &nbsp;
  45. &nbsp;<A HREF="PropertiesBean.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  46. &nbsp;
  47. <NOSCRIPT>
  48. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  49. </NOSCRIPT>
  50. </FONT></TD>
  51. </TR>
  52. <TR>
  53. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  54. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  55. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  56. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  57. </TR>
  58. </TABLE>
  59. <A NAME="skip-navbar_top"></A>
  60. <!-- ========= END OF TOP NAVBAR ========= -->
  61. <HR>
  62. <!-- ======== START OF CLASS DATA ======== -->
  63. <H2>
  64. <FONT SIZE="-1">
  65. org.gjt.sp.util</FONT>
  66. <BR>
  67. Class PropertiesBean</H2>
  68. <PRE>
  69. java.lang.Object
  70. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.util.PropertiesBean</B>
  71. </PRE>
  72. <HR>
  73. <DL>
  74. <DT><PRE>public abstract class <B>PropertiesBean</B><DT>extends java.lang.Object</DL>
  75. </PRE>
  76. <P>
  77. A "java bean" that can serialize itself into a java.util.Properties
  78. instance. For the serialization, the class uses the java beans
  79. instrospection mechanism to figure out the class's available
  80. properties, and saves all the properties as strings in the properties
  81. object.
  82. <p>Properties are saved based on a "root", which is set up during the
  83. instantiation of the object. The properties will be set as
  84. <code>root.property_name</code>.</p>
  85. <p>Only native types (boolean, char, double, float, int, long, short),
  86. Strings, and arrays of those types are supported. Also, nested
  87. beans are not supported presently.</p>
  88. <P>
  89. <P>
  90. <DL>
  91. <DT><B>Since:</B></DT>
  92. <DD>jEdit 4.3pre7</DD>
  93. </DL>
  94. <HR>
  95. <P>
  96. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  97. <A NAME="constructor_summary"><!-- --></A>
  98. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  99. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  100. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  101. <B>Constructor Summary</B></FONT></TH>
  102. </TR>
  103. <TR BGCOLOR="white" CLASS="TableRowColor">
  104. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  105. <CODE>protected </CODE></FONT></TD>
  106. <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#PropertiesBean(java.lang.String)">PropertiesBean</A></B>(java.lang.String&nbsp;root)</CODE>
  107. <BR>
  108. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance with the given root and the default array
  109. separator char (':').</TD>
  110. </TR>
  111. <TR BGCOLOR="white" CLASS="TableRowColor">
  112. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  113. <CODE>protected </CODE></FONT></TD>
  114. <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#PropertiesBean(java.lang.String, char)">PropertiesBean</A></B>(java.lang.String&nbsp;root,
  115. char&nbsp;arraysep)</CODE>
  116. <BR>
  117. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance with the given root and the given array
  118. separator character.</TD>
  119. </TR>
  120. </TABLE>
  121. &nbsp;
  122. <!-- ========== METHOD SUMMARY =========== -->
  123. <A NAME="method_summary"><!-- --></A>
  124. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  125. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  126. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  127. <B>Method Summary</B></FONT></TH>
  128. </TR>
  129. <TR BGCOLOR="white" CLASS="TableRowColor">
  130. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  131. <CODE>&nbsp;void</CODE></FONT></TD>
  132. <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#clean(java.util.Properties)">clean</A></B>(java.util.Properties&nbsp;p)</CODE>
  133. <BR>
  134. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cleans the entries related to this object from the given object.</TD>
  135. </TR>
  136. <TR BGCOLOR="white" CLASS="TableRowColor">
  137. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  138. <CODE>&nbsp;void</CODE></FONT></TD>
  139. <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#load(java.util.Properties)">load</A></B>(java.util.Properties&nbsp;p)</CODE>
  140. <BR>
  141. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads the bean's properties from the given object.</TD>
  142. </TR>
  143. <TR BGCOLOR="white" CLASS="TableRowColor">
  144. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  145. <CODE>&nbsp;void</CODE></FONT></TD>
  146. <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#save(java.util.Properties)">save</A></B>(java.util.Properties&nbsp;p)</CODE>
  147. <BR>
  148. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the bean's properties into the given object.</TD>
  149. </TR>
  150. </TABLE>
  151. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  152. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  153. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  154. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  155. </TR>
  156. <TR BGCOLOR="white" CLASS="TableRowColor">
  157. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  158. </TR>
  159. </TABLE>
  160. &nbsp;
  161. <P>
  162. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  163. <A NAME="constructor_detail"><!-- --></A>
  164. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  165. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  166. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  167. <B>Constructor Detail</B></FONT></TH>
  168. </TR>
  169. </TABLE>
  170. <A NAME="PropertiesBean(java.lang.String)"><!-- --></A><H3>
  171. PropertiesBean</H3>
  172. <PRE>
  173. protected <B>PropertiesBean</B>(java.lang.String&nbsp;root)</PRE>
  174. <DL>
  175. <DD>Creates a new instance with the given root and the default array
  176. separator char (':').
  177. <P>
  178. <DL>
  179. <DT><B>Parameters:</B><DD><CODE>root</CODE> - A non-null string that will be the "root" of the
  180. serialized properties.</DL>
  181. </DL>
  182. <HR>
  183. <A NAME="PropertiesBean(java.lang.String, char)"><!-- --></A><H3>
  184. PropertiesBean</H3>
  185. <PRE>
  186. protected <B>PropertiesBean</B>(java.lang.String&nbsp;root,
  187. char&nbsp;arraysep)</PRE>
  188. <DL>
  189. <DD>Creates a new instance with the given root and the given array
  190. separator character.
  191. <P>
  192. <DL>
  193. <DT><B>Parameters:</B><DD><CODE>root</CODE> - A non-null string that will be the "root" of the
  194. serialized properties.<DD><CODE>arraysep</CODE> - A character that will be used to define the
  195. separator of elements of an array property.</DL>
  196. </DL>
  197. <!-- ============ METHOD DETAIL ========== -->
  198. <A NAME="method_detail"><!-- --></A>
  199. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  200. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  201. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  202. <B>Method Detail</B></FONT></TH>
  203. </TR>
  204. </TABLE>
  205. <A NAME="load(java.util.Properties)"><!-- --></A><H3>
  206. load</H3>
  207. <PRE>
  208. public void <B>load</B>(java.util.Properties&nbsp;p)</PRE>
  209. <DL>
  210. <DD>Loads the bean's properties from the given object.
  211. <P>
  212. <DD><DL>
  213. </DL>
  214. </DD>
  215. </DL>
  216. <HR>
  217. <A NAME="save(java.util.Properties)"><!-- --></A><H3>
  218. save</H3>
  219. <PRE>
  220. public void <B>save</B>(java.util.Properties&nbsp;p)</PRE>
  221. <DL>
  222. <DD>Saves the bean's properties into the given object.
  223. <P>
  224. <DD><DL>
  225. </DL>
  226. </DD>
  227. </DL>
  228. <HR>
  229. <A NAME="clean(java.util.Properties)"><!-- --></A><H3>
  230. clean</H3>
  231. <PRE>
  232. public void <B>clean</B>(java.util.Properties&nbsp;p)</PRE>
  233. <DL>
  234. <DD>Cleans the entries related to this object from the given object.
  235. <P>
  236. <DD><DL>
  237. </DL>
  238. </DD>
  239. </DL>
  240. <!-- ========= END OF CLASS DATA ========= -->
  241. <HR>
  242. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  243. <A NAME="navbar_bottom"><!-- --></A>
  244. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  245. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  246. <TR>
  247. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  248. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  249. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  250. <TR ALIGN="center" VALIGN="top">
  251. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  252. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  253. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  254. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PropertiesBean.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  255. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  256. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  257. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  258. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  259. </TR>
  260. </TABLE>
  261. </TD>
  262. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  263. </EM>
  264. </TD>
  265. </TR>
  266. <TR>
  267. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  268. &nbsp;<A HREF="../../../../org/gjt/sp/util/ProgressObserver.html" title="interface in org.gjt.sp.util"><B>PREV CLASS</B></A>&nbsp;
  269. &nbsp;<A HREF="../../../../org/gjt/sp/util/ReadWriteLock.html" title="class in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
  270. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  271. <A HREF="../../../../index.html?org/gjt/sp/util/PropertiesBean.html" target="_top"><B>FRAMES</B></A> &nbsp;
  272. &nbsp;<A HREF="PropertiesBean.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  273. &nbsp;
  274. <NOSCRIPT>
  275. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  276. </NOSCRIPT>
  277. </FONT></TD>
  278. </TR>
  279. <TR>
  280. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  281. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  282. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  283. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  284. </TR>
  285. </TABLE>
  286. <A NAME="skip-navbar_bottom"></A>
  287. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  288. <HR>
  289. </BODY>
  290. </HTML>