⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classfactory.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="ClassFactory()"><!-- --></A><H3>ClassFactory</H3><PRE>protected <B>ClassFactory</B>()</PRE><DL><DD>Constructor for ClassFactory. Instances of ClassFactory are created only  by the singleton subclasses.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getAssocTable()"><!-- --></A><H3>getAssocTable</H3><PRE>protected abstract java.util.Map <B>getAssocTable</B>()</PRE><DL><DD>Used by ClassFactory methods to get the mapping of keys to constructors.<P><DD><DL><DT><B>Returns:</B><DD>the hashtable containing the mappings.</DL></DD></DL><HR><A NAME="getClassForKey()"><!-- --></A><H3>getClassForKey</H3><PRE>protected abstract java.lang.Class <B>getClassForKey</B>()</PRE><DL><DD>Used by ClassFactory methods to ensure that all keys used with the  mapping are of the correct type.<P><DD><DL><DT><B>Returns:</B><DD>Class object of the key type.</DL></DD></DL><HR><A NAME="getAvailableKeys()"><!-- --></A><H3>getAvailableKeys</H3><PRE>public java.util.Iterator <B>getAvailableKeys</B>()</PRE><DL><DD>Return all of the available keys for this factory. All elements will be  of the same type as the result as <code>getClassForKey</code>.<P><DD><DL><DT><B>Returns:</B><DD>Iterator containing all of the available keys for this   factory. All elements will be of the same type as the result as   <code>getClassForKey</code>.</DL></DD></DL><HR><A NAME="getEntrySet()"><!-- --></A><H3>getEntrySet</H3><PRE>public java.util.Set <B>getEntrySet</B>()</PRE><DL><DD>Returns an umodifiable Set containing all of the associations stored in  this ClassFactory. Each entry is of type <code>Map.Entry</code>.<P><DD><DL><DT><B>Returns:</B><DD>Set Containing all of the available entries for this  factory.</DL></DD></DL><HR><A NAME="getClassOfInstantiators()"><!-- --></A><H3>getClassOfInstantiators</H3><PRE>protected abstract java.lang.Class <B>getClassOfInstantiators</B>()</PRE><DL><DD>Used by ClassFactory methods to ensure that all of the instance classes  which register with this factory have the correct base class<P><DD><DL><DT><B>Returns:</B><DD>Class object of the "Factory" type.</DL></DD></DL><HR><A NAME="registerFromResources(java.lang.String, java.lang.String)"><!-- --></A><H3>registerFromResources</H3><PRE>protected boolean <B>registerFromResources</B>(java.lang.String&nbsp;resourceName,                                        java.lang.String&nbsp;propertyName)                                 throws java.util.MissingResourceException</PRE><DL><DD>Given a resource bundle identifier and a property name register instance classes. The property must be a string containing class names which must be found on the current class path. The class names are seperated by spaces.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>resourceName</CODE> - name of the resource bundle<DD><CODE>propertyName</CODE> - name of the property.<DT><B>Returns:</B><DD>boolean true if at least one instance class could be registered             with this factory.<DT><B>Throws:</B><DD><CODE>java.util.MissingResourceException</CODE> - if the resource bundle or property cannot be located.</DL></DD></DL><HR><A NAME="registerFromString(java.lang.String)"><!-- --></A><H3>registerFromString</H3><PRE>protected boolean <B>registerFromString</B>(java.lang.String&nbsp;classNamesString)</PRE><DL><DD>Register instance classes given a string containing class names which  must be found on the current class path. The class names are seperated  by spaces.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>classNamesString</CODE> - The class name list<DT><B>Returns:</B><DD>boolean true if at least one of the instance classes could be  registered otherwise false.</DL></DD></DL><HR><A NAME="registerAssoc(java.lang.String)"><!-- --></A><H3>registerAssoc</H3><PRE>protected boolean <B>registerAssoc</B>(java.lang.String&nbsp;className)                         throws java.lang.Exception</PRE><DL><DD>Register a class with the factory from its class name. Since class name  doesn't tell us much, we just load the class and hope that something  happens as a result of the class loading. This class is often overridden  in class factories to interogate the instance class before registering  the instance class.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>className</CODE> - The class name which will be regiestered.<DT><B>Returns:</B><DD>boolean true if the class was registered otherwise false.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - when an error occurs.</DL></DD></DL><HR><A NAME="registerAssoc(java.lang.Object, java.lang.Object)"><!-- --></A><H3>registerAssoc</H3><PRE>protected boolean <B>registerAssoc</B>(java.lang.Object&nbsp;key,                                java.lang.Object&nbsp;instantiator)</PRE><DL><DD>Register a key and instance class with the factory.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to register.<DD><CODE>instantiator</CODE> - The instantiator object which will be registered for this key.<DT><B>Returns:</B><DD>boolean true if the key was successfully registered otherwise false.</DL></DD></DL><HR><A NAME="getInstantiator(java.lang.Object)"><!-- --></A><H3>getInstantiator</H3><PRE>protected java.lang.Object <B>getInstantiator</B>(java.lang.Object&nbsp;key)                                    throws java.util.NoSuchElementException</PRE><DL><DD>Return the instantiator associated with the provided key.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - The identifier for the Instantiator class to be returned.<DT><B>Returns:</B><DD>Instantiator Instantiator matching the provided key<DT><B>Throws:</B><DD><CODE>java.util.NoSuchElementException</CODE> - if the key has not been registerd.</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=3 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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ClassFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../net/jxta/util/AwtUtils.html" title="class in net.jxta.util"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../net/jxta/util/CountingInputStream.html" title="class in net.jxta.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="ClassFactory.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -