/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
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!--NewPage-->
- <HTML>
- <HEAD>
- <!-- Generated by javadoc (build 1.5.0_14) on Tue Jul 22 07:14:16 GMT-08:00 2008 -->
- <TITLE>
- PropertiesBean (jEdit API)
- </TITLE>
- <META NAME="keywords" CONTENT="org.gjt.sp.util.PropertiesBean class">
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
- <NOSCRIPT>
- </NOSCRIPT>
- </HEAD>
- <BODY BGCOLOR="white" >
- <!-- ========= START OF TOP NAVBAR ======= -->
- <A NAME="navbar_top"><!-- --></A>
- <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_top_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PropertiesBean.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../org/gjt/sp/util/ProgressObserver.html" title="interface in org.gjt.sp.util"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/gjt/sp/util/ReadWriteLock.html" title="class in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/gjt/sp/util/PropertiesBean.html" target="_top"><B>FRAMES</B></A>
- <A HREF="PropertiesBean.html" target="_top"><B>NO FRAMES</B></A>
-
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_top"></A>
- <!-- ========= END OF TOP NAVBAR ========= -->
- <HR>
- <!-- ======== START OF CLASS DATA ======== -->
- <H2>
- <FONT SIZE="-1">
- org.gjt.sp.util</FONT>
- <BR>
- Class PropertiesBean</H2>
- <PRE>
- java.lang.Object
- <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.util.PropertiesBean</B>
- </PRE>
- <HR>
- <DL>
- <DT><PRE>public abstract class <B>PropertiesBean</B><DT>extends java.lang.Object</DL>
- </PRE>
- <P>
- A "java bean" that can serialize itself into a java.util.Properties
- instance. For the serialization, the class uses the java beans
- instrospection mechanism to figure out the class's available
- properties, and saves all the properties as strings in the properties
- object.
- <p>Properties are saved based on a "root", which is set up during the
- instantiation of the object. The properties will be set as
- <code>root.property_name</code>.</p>
- <p>Only native types (boolean, char, double, float, int, long, short),
- Strings, and arrays of those types are supported. Also, nested
- beans are not supported presently.</p>
- <P>
- <P>
- <DL>
- <DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre7</DD>
- </DL>
- <HR>
- <P>
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <A NAME="constructor_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Constructor Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>protected </CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#PropertiesBean(java.lang.String)">PropertiesBean</A></B>(java.lang.String root)</CODE>
- <BR>
- Creates a new instance with the given root and the default array
- separator char (':').</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>protected </CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#PropertiesBean(java.lang.String, char)">PropertiesBean</A></B>(java.lang.String root,
- char arraysep)</CODE>
- <BR>
- Creates a new instance with the given root and the given array
- separator character.</TD>
- </TR>
- </TABLE>
-
- <!-- ========== METHOD SUMMARY =========== -->
- <A NAME="method_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Method Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#clean(java.util.Properties)">clean</A></B>(java.util.Properties p)</CODE>
- <BR>
- Cleans the entries related to this object from the given object.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#load(java.util.Properties)">load</A></B>(java.util.Properties p)</CODE>
- <BR>
- Loads the bean's properties from the given object.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/PropertiesBean.html#save(java.util.Properties)">save</A></B>(java.util.Properties p)</CODE>
- <BR>
- Saves the bean's properties into the given object.</TD>
- </TR>
- </TABLE>
- <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
- <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
- </TR>
- </TABLE>
-
- <P>
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <A NAME="constructor_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
- <B>Constructor Detail</B></FONT></TH>
- </TR>
- </TABLE>
- <A NAME="PropertiesBean(java.lang.String)"><!-- --></A><H3>
- PropertiesBean</H3>
- <PRE>
- protected <B>PropertiesBean</B>(java.lang.String root)</PRE>
- <DL>
- <DD>Creates a new instance with the given root and the default array
- separator char (':').
- <P>
- <DL>
- <DT><B>Parameters:</B><DD><CODE>root</CODE> - A non-null string that will be the "root" of the
- serialized properties.</DL>
- </DL>
- <HR>
- <A NAME="PropertiesBean(java.lang.String, char)"><!-- --></A><H3>
- PropertiesBean</H3>
- <PRE>
- protected <B>PropertiesBean</B>(java.lang.String root,
- char arraysep)</PRE>
- <DL>
- <DD>Creates a new instance with the given root and the given array
- separator character.
- <P>
- <DL>
- <DT><B>Parameters:</B><DD><CODE>root</CODE> - A non-null string that will be the "root" of the
- serialized properties.<DD><CODE>arraysep</CODE> - A character that will be used to define the
- separator of elements of an array property.</DL>
- </DL>
- <!-- ============ METHOD DETAIL ========== -->
- <A NAME="method_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
- <B>Method Detail</B></FONT></TH>
- </TR>
- </TABLE>
- <A NAME="load(java.util.Properties)"><!-- --></A><H3>
- load</H3>
- <PRE>
- public void <B>load</B>(java.util.Properties p)</PRE>
- <DL>
- <DD>Loads the bean's properties from the given object.
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="save(java.util.Properties)"><!-- --></A><H3>
- save</H3>
- <PRE>
- public void <B>save</B>(java.util.Properties p)</PRE>
- <DL>
- <DD>Saves the bean's properties into the given object.
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="clean(java.util.Properties)"><!-- --></A><H3>
- clean</H3>
- <PRE>
- public void <B>clean</B>(java.util.Properties p)</PRE>
- <DL>
- <DD>Cleans the entries related to this object from the given object.
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <!-- ========= END OF CLASS DATA ========= -->
- <HR>
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <A NAME="navbar_bottom"><!-- --></A>
- <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_bottom_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PropertiesBean.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../org/gjt/sp/util/ProgressObserver.html" title="interface in org.gjt.sp.util"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/gjt/sp/util/ReadWriteLock.html" title="class in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/gjt/sp/util/PropertiesBean.html" target="_top"><B>FRAMES</B></A>
- <A HREF="PropertiesBean.html" target="_top"><B>NO FRAMES</B></A>
-
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_bottom"></A>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <HR>
- </BODY>
- </HTML>