[picocontainer-scm] [5626] java/2.x/trunk/pico/distribution/src/site/content: small fixes to converters doco, and date update

paul-yCVjj/[email protected]
Newsgroups gmane.comp.java.picocontainer.cvs
Message-ID <[email protected]>
Revision 5626
Author paul
Date 2010-02-20 19:48:54 -0600 (Sat, 20 Feb 2010)

Log Message

small fixes to converters doco, and date update

Modified Paths

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

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

Diff

Modified: java/2.x/trunk/pico/distribution/src/site/content/converters.html (5625 => 5626)

--- java/2.x/trunk/pico/distribution/src/site/content/converters.html 2010-02-20 02:09:16 UTC (rev 5625)
+++ java/2.x/trunk/pico/distribution/src/site/content/converters.html 2010-02-21 01:48:54 UTC (rev 5626)
@@ -54,34 +54,34 @@
directly.&nbsp; BuiltInConverter has a method addConverter(..) which
you may find convenient:
</p>
-<div class="source"><pre>BuiltInConverter bic = new
-BuiltInConverter();
-bic.addConverter(SomeCustomThing.class, new SomeCustomThingConverter());
+<div class="source"><pre>BuiltInConverters bic = new
+BuiltInConverters();
+bic.addConverter(new SomeCustomThingConverter(), SomeCustomThing.class);
</pre></div>
<p>
-Alternatively, you can subclass BuildInConverter:
+Alternatively, you can subclass BuildInConverters:
</p>
-<div class="source"><pre>BuiltInConverter bic = new BuiltInConverter() {
+<div class="source"><pre>BuiltInConverters bic = new BuiltInConverters() {
@Override
protected void addBuiltInConverters() {
super.addBuiltInConverters();
- super.addConverter(SomeCustomThing.class, new SomeCustomThingConverter());
+ super.addConverter(new SomeCustomThingConverter(), SomeCustomThing.class);
}
};
</pre></div>
<p>
or:<br/>
</p>
-<div class="source"><pre>BuiltInConverter bic = new BuiltInConverter() {
- public BuiltInConverter() {
- super.addConverter(SomeCustomThing.class, new SomeCustomThingConverter());
+<div class="source"><pre>BuiltInConverters bic = new BuiltInConverters() {
+ public BuiltInConverters() {
+ super.addConverter(new SomeCustomThingConverter(), SomeCustomThing.class);
}
};
</pre></div>
<p>
Converters themselves are easy to write.&nbsp; Here's the built in one
for boolean:</p>
-<div class="source"><pre>class BooleanConverter implements Converter<Boolean>{
+<div class="source"><pre>class BooleanConverter implements Converter&gt;Boolean&lt;{
public Boolean convert(String paramValue) {
return Boolean.valueOf(paramValue);
}
@@ -93,9 +93,9 @@
MutableContainer pico = new DefaultPicoContainer() {
@Override
public ConverterSet getConverter() {
- return new BuildInConverter() {
- public BuiltInConverter() {
- super.addConverter(SomeCustomThing.class, new SomeCustomThingConverter());
+ return new BuildInConverters() {
+ public BuiltInConverters() {
+ super.addConverter(new SomeCustomThingConverter(), SomeCustomThing.class);
}
}
}

Modified: java/2.x/trunk/pico/distribution/src/site/content/news.html (5625 => 5626)

--- java/2.x/trunk/pico/distribution/src/site/content/news.html 2010-02-20 02:09:16 UTC (rev 5625)
+++ java/2.x/trunk/pico/distribution/src/site/content/news.html 2010-02-21 01:48:54 UTC (rev 5626)
@@ -6,7 +6,7 @@
</head>
<body>

- <p><strong>Feb 14, 2010 - PicoContainer 2.10 released (307K jar)</strong></p>
+ <p><strong>Feb 20, 2010 - PicoContainer 2.10 released (308K jar)</strong></p>

<p>New (since 2.9):</p>
<ul>

----------

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.