1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.5.0_07) on Fri Apr 11 15:39:19 BST 2008 -->
6 <META http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1">
8 PrototypeFactory (Commons Collections
3.2.1 API)
11 <META NAME=
"keywords" CONTENT=
"org.apache.commons.collections.functors.PrototypeFactory class">
13 <LINK REL =
"stylesheet" TYPE=
"text/css" HREF=
"../../../../../stylesheet.css" TITLE=
"Style">
15 <SCRIPT type=
"text/javascript">
16 function windowTitle()
18 parent.document.
title=
"PrototypeFactory (Commons Collections 3.2.1 API)";
26 <BODY BGCOLOR=
"white" onload=
"windowTitle();">
29 <!-- ========= START OF TOP NAVBAR ======= -->
30 <A NAME=
"navbar_top"><!-- --></A>
31 <A HREF=
"#skip-navbar_top" title=
"Skip navigation links"></A>
32 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
34 <TD COLSPAN=
2 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
35 <A NAME=
"navbar_top_firstrow"><!-- --></A>
36 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
37 <TR ALIGN=
"center" VALIGN=
"top">
38 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
39 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
40 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
41 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/PrototypeFactory.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
42 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
43 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
44 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
45 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
49 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
55 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
56 <A HREF=
"../../../../../org/apache/commons/collections/functors/PredicateTransformer.html" title=
"class in org.apache.commons.collections.functors"><B>PREV CLASS
</B></A>
57 <A HREF=
"../../../../../org/apache/commons/collections/functors/StringValueTransformer.html" title=
"class in org.apache.commons.collections.functors"><B>NEXT CLASS
</B></A></FONT></TD>
58 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
59 <A HREF=
"../../../../../index.html?org/apache/commons/collections/functors/PrototypeFactory.html" target=
"_top"><B>FRAMES
</B></A>
60 <A HREF=
"PrototypeFactory.html" target=
"_top"><B>NO FRAMES
</B></A>
61 <SCRIPT type=
"text/javascript">
64 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
69 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
76 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
77 SUMMARY:
NESTED
|
FIELD
|
CONSTR
|
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
78 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
79 DETAIL:
FIELD
|
CONSTR
|
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
82 <A NAME=
"skip-navbar_top"></A>
83 <!-- ========= END OF TOP NAVBAR ========= -->
86 <!-- ======== START OF CLASS DATA ======== -->
89 org.apache.commons.collections.functors
</FONT>
91 Class PrototypeFactory
</H2>
94 <IMG SRC=
"../../../../../resources/inherit.gif" ALT=
"extended by "><B>org.apache.commons.collections.functors.PrototypeFactory
</B>
98 <DT><PRE>public class
<B>PrototypeFactory
</B><DT>extends java.lang.Object
</DL>
102 Factory implementation that creates a new instance each time based on a prototype.
107 <DT><B>Since:
</B></DT>
108 <DD>Commons Collections
3.0</DD>
109 <DT><B>Version:
</B></DT>
110 <DD>$Revision:
646777 $ $Date:
2008-
04-
10 13:
33:
15 +
0100 (Thu,
10 Apr
2008) $
</DD>
111 <DT><B>Author:
</B></DT>
112 <DD>Stephen Colebourne
</DD>
118 <!-- ========== METHOD SUMMARY =========== -->
120 <A NAME=
"method_summary"><!-- --></A>
121 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
122 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
123 <TH ALIGN=
"left" COLSPAN=
"2"><FONT SIZE=
"+2">
124 <B>Method Summary
</B></FONT></TH>
126 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
127 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
128 <CODE>static
<A HREF=
"../../../../../org/apache/commons/collections/Factory.html" title=
"interface in org.apache.commons.collections">Factory
</A></CODE></FONT></TD>
129 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/collections/functors/PrototypeFactory.html#getInstance(java.lang.Object)">getInstance
</A></B>(java.lang.Object
prototype)
</CODE>
132 Factory method that performs validation.
</TD>
135 <A NAME=
"methods_inherited_from_class_java.lang.Object"><!-- --></A>
136 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
137 <TR BGCOLOR=
"#EEEEFF" CLASS=
"TableSubHeadingColor">
138 <TH ALIGN=
"left"><B>Methods inherited from class java.lang.Object
</B></TH>
140 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
141 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</CODE></TD>
147 <!-- ============ METHOD DETAIL ========== -->
149 <A NAME=
"method_detail"><!-- --></A>
150 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
151 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
152 <TH ALIGN=
"left" COLSPAN=
"1"><FONT SIZE=
"+2">
153 <B>Method Detail
</B></FONT></TH>
157 <A NAME=
"getInstance(java.lang.Object)"><!-- --></A><H3>
160 public static
<A HREF=
"../../../../../org/apache/commons/collections/Factory.html" title=
"interface in org.apache.commons.collections">Factory
</A> <B>getInstance
</B>(java.lang.Object
prototype)
</PRE>
162 <DD>Factory method that performs validation.
164 Creates a Factory that will return a clone of the same prototype object
165 each time the factory is used. The prototype will be cloned using one of these
166 techniques (in order):
168 <li>public clone method
169 <li>public copy constructor
170 <li>serialization clone
174 <DT><B>Parameters:
</B><DD><CODE>prototype
</CODE> - the object to clone each time in the factory
175 <DT><B>Returns:
</B><DD>the
<code>prototype
</code> factory
177 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the prototype is null
178 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the prototype cannot be cloned
</DL>
181 <!-- ========= END OF CLASS DATA ========= -->
185 <!-- ======= START OF BOTTOM NAVBAR ====== -->
186 <A NAME=
"navbar_bottom"><!-- --></A>
187 <A HREF=
"#skip-navbar_bottom" title=
"Skip navigation links"></A>
188 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
190 <TD COLSPAN=
2 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
191 <A NAME=
"navbar_bottom_firstrow"><!-- --></A>
192 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
193 <TR ALIGN=
"center" VALIGN=
"top">
194 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
195 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
196 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
197 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/PrototypeFactory.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
198 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
199 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
200 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
201 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
205 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
211 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
212 <A HREF=
"../../../../../org/apache/commons/collections/functors/PredicateTransformer.html" title=
"class in org.apache.commons.collections.functors"><B>PREV CLASS
</B></A>
213 <A HREF=
"../../../../../org/apache/commons/collections/functors/StringValueTransformer.html" title=
"class in org.apache.commons.collections.functors"><B>NEXT CLASS
</B></A></FONT></TD>
214 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
215 <A HREF=
"../../../../../index.html?org/apache/commons/collections/functors/PrototypeFactory.html" target=
"_top"><B>FRAMES
</B></A>
216 <A HREF=
"PrototypeFactory.html" target=
"_top"><B>NO FRAMES
</B></A>
217 <SCRIPT type=
"text/javascript">
220 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
225 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
232 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
233 SUMMARY:
NESTED
|
FIELD
|
CONSTR
|
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
234 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
235 DETAIL:
FIELD
|
CONSTR
|
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
238 <A NAME=
"skip-navbar_bottom"></A>
239 <!-- ======== END OF BOTTOM NAVBAR ======= -->
242 Copyright ©
2001-
2008 <a href=
"http://www.apache.org/">The Apache Software Foundation
</a>. All Rights Reserved.