[picocontainer-scm] [5553] java/2.x/trunk/pico/distribution/src/site/content: start of regex page

paul-yCVjj/[email protected]
Newsgroups gmane.comp.java.picocontainer.cvs
Message-ID <[email protected]>
Revision 5553
Author paul
Date 2009-11-01 12:25:15 -0600 (Sun, 01 Nov 2009)

Log Message

start of regex page

Modified Paths

- java/2.x/trunk/pico/distribution/src/site/content/monitors.html

- java/2.x/trunk/pico/distribution/src/site/content/sitemap.xml

Added Paths

- java/2.x/trunk/pico/distribution/src/site/content/regex.html

Diff

Modified: java/2.x/trunk/pico/distribution/src/site/content/monitors.html (5552 => 5553)

--- java/2.x/trunk/pico/distribution/src/site/content/monitors.html 2009-11-01 18:14:26 UTC (rev 5552)
+++ java/2.x/trunk/pico/distribution/src/site/content/monitors.html 2009-11-01 18:25:15 UTC (rev 5553)
@@ -55,7 +55,7 @@
return different values, making them modify PicoContainer's behavior.
</li>
</ol>
-
+<br/>
<h2>Supplied ComponentMonitor implementations</h2>

<h3>Logging or text-centric varieties of ComponentMonitor </h3>
@@ -97,12 +97,6 @@
is a ComponentMonitor that stores life-cycle failures and rethrows them later if rethrowLifecycleFailuresException()
is called. </p>

-<h3>Future work</h3>
-
-<p>Implementations that:</p>
-<ul>
- <li>Record component injections and play them back later (optimized web frameworks)</li>
-</ul>
<h3>DotDependencyGraphComponentMonitor (Gems)</h3>

<p>
@@ -121,5 +115,28 @@
instance to a <a
href="http://picocontainer.org/javadoc/gems/org/picocontainer/gems/monitors/ComponentDependencyMonitor.html">ComponentDependencyMonitor</a>
one. Call getGraph() to retrieve the graph for use with Prefuse</p>
+<br/>
+<h2>Composers</h2>
+
+ <p>ComposingMonitor is an implementation of the Monitor design that works specifically in conjunction with noComponentFound(..) to allow greater collaboration in the supply of components for the purposes of injection </p>
+
+<div class="source">
+<pre>MutablePicoContainer pico = new DefaultPicoContainer(new ComposingMonitor( /* varargs of composer instances */));
+</pre>
+</div>
+<p>If more than one is specified in the varargs above, then the first in the list to actually return non-null will be used. It is also possible for a fallback component monitor to be specified:</p>
+<div class="source">
+<pre>ComponentMonitor otherCM = ...
+MutablePicoContainer pico = new DefaultPicoContainer(new ComposingMonitor(otherCM, /* varargs of composer instances */));
+</pre>
+</div>
+<p>See <a href="regex.html">Regex Composer</a></p>
+<h2>Future work</h2>
+
+ <p>Implementations that:</p>
+ <ul>
+ <li>Record component injections and play them back later (optimized web frameworks)</li>
+ </ul>
+
</body>
</html>

Copied: java/2.x/trunk/pico/distribution/src/site/content/regex.html (from rev 5550, java/2.x/trunk/pico/distribution/src/site/content/behaviors.html) (0 => 5553)

--- java/2.x/trunk/pico/distribution/src/site/content/regex.html (rev 0)
+++ java/2.x/trunk/pico/distribution/src/site/content/regex.html 2009-11-01 18:25:15 UTC (rev 5553)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>Regex Composer</title>
+
+ <style type="text/css">
+ <!--
+ .style1 {
+ font-family: "Courier New", Courier, monospace
+ }
+
+ -->
+ </style>
+</head>
+<body>
+<p>A RegexComposer allows for regular expressions to be used in conjunction with making lists of components that match that regular expression.</p>
+<div class="source">
+<pre>
+MutablePicoContainer pico = new DefaultPicoContainer(new ComposingMonitor(new RegexComposer()));
+pico.addComponent("apple1", "Braeburn");
+pico.addComponent("apple2", "Granny Smith");
+pico.addComponent("plum", "Victoria");
+List apples = (List) pico.getComponent("apple[1-9]");
+assertEquals("[Braeburn, Granny Smith]", apples.toString());
+</pre>
+</div>
+</body>
+</html>
\ No newline at end of file

Modified: java/2.x/trunk/pico/distribution/src/site/content/sitemap.xml (5552 => 5553)

--- java/2.x/trunk/pico/distribution/src/site/content/sitemap.xml 2009-11-01 18:14:26 UTC (rev 5552)
+++ java/2.x/trunk/pico/distribution/src/site/content/sitemap.xml 2009-11-01 18:25:15 UTC (rev 5553)
@@ -53,6 +53,7 @@
<page>properties.html</page>
<page>component-configuration.html</page>
<page>monitors.html</page>
+ <page>regex.html</page>
</section>
<section>
<name>PicoContainer's Architecture</name>

----------

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.