﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-坚持是底基-文章分类-Java</title><link>http://www.blogjava.net/soken/category/47553.html</link><description>寻求</description><language>zh-cn</language><lastBuildDate>Mon, 12 Mar 2012 12:47:09 GMT</lastBuildDate><pubDate>Mon, 12 Mar 2012 12:47:09 GMT</pubDate><ttl>60</ttl><item><title>Springmvc构造RESTful详细讲解</title><link>http://www.blogjava.net/soken/articles/371548.html</link><dc:creator>soken</dc:creator><author>soken</author><pubDate>Thu, 08 Mar 2012 13:27:00 GMT</pubDate><guid>http://www.blogjava.net/soken/articles/371548.html</guid><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Rest介绍&nbsp;Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/blog/1　HTTP　GET　=&gt;　　得到id　=　1的blog/blog/1　HTTP　DELETE　=&gt;　删除　id　=　1的blog/blog/1　H...&nbsp;&nbsp;<a href='http://www.blogjava.net/soken/articles/371548.html'>阅读全文</a><img src ="http://www.blogjava.net/soken/aggbug/371548.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/soken/" target="_blank">soken</a> 2012-03-08 21:27 <a href="http://www.blogjava.net/soken/articles/371548.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java 并发核心编程(转)</title><link>http://www.blogjava.net/soken/articles/361536.html</link><dc:creator>soken</dc:creator><author>soken</author><pubDate>Tue, 18 Oct 2011 12:05:00 GMT</pubDate><guid>http://www.blogjava.net/soken/articles/361536.html</guid><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Java&nbsp;并发核心编程内容涉及:1、关于java并发2、概念3、保护共享数据4、并发集合类5线程6、线程协作及其他&nbsp;1、关于java并发自从java创建以来就已经支持并发的理念，如线程和锁。这篇指南主要是为帮助java多线程开发人员理解并发的核心概念以及如何应用这些理念。本文的主题是关于具有java语言风格的Thread、synchron...&nbsp;&nbsp;<a href='http://www.blogjava.net/soken/articles/361536.html'>阅读全文</a><img src ="http://www.blogjava.net/soken/aggbug/361536.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/soken/" target="_blank">soken</a> 2011-10-18 20:05 <a href="http://www.blogjava.net/soken/articles/361536.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ValueStack</title><link>http://www.blogjava.net/soken/articles/361267.html</link><dc:creator>soken</dc:creator><author>soken</author><pubDate>Fri, 14 Oct 2011 04:47:00 GMT</pubDate><guid>http://www.blogjava.net/soken/articles/361267.html</guid><description><![CDATA[ValueStack vs = (ValueStack)request.getAttribute("struts.valueStack");<br />Object obj = vs.getRoot().pop();<br />弹出值栈顶值<br /><br />从当前值栈顶中查找元素<br />vs.findValue("appAuthInfoService");<img src ="http://www.blogjava.net/soken/aggbug/361267.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/soken/" target="_blank">soken</a> 2011-10-14 12:47 <a href="http://www.blogjava.net/soken/articles/361267.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jdk中的设计模式</title><link>http://www.blogjava.net/soken/articles/353750.html</link><dc:creator>soken</dc:creator><author>soken</author><pubDate>Tue, 05 Jul 2011 15:02:00 GMT</pubDate><guid>http://www.blogjava.net/soken/articles/353750.html</guid><description><![CDATA[<p><strong><span style="text-decoration: underline">Structural（结构模式）</span></strong></p>
<div><strong>Adapter:</strong><br />把一个接口或是类变成另外一种。 
<ul><li>java.util.Arrays#asList()</li><li>javax.swing.JTable(TableModel)</li><li>java.io.InputStreamReader(InputStream)</li><li>java.io.OutputStreamWriter(OutputStream)</li><li>javax.xml.bind.annotation.adapters.XmlAdapter#marshal()</li><li>javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal()</li></ul>
<p><strong>Bridge:</strong><br />把抽象和实现解藕，于是接口和实现可在完全独立开来。</p>
<ul><li>AWT (提供了抽象层映射于实际的操作系统)</li><li>JDBC</li></ul>
<p><strong>Composite:</strong><br />让使用者把单独的对象和组合对象混用。</p>
<ul><li>javax.swing.JComponent#add(Component)</li><li>java.awt.Container#add(Component)</li><li>java.util.Map#putAll(Map)</li><li>java.util.List#addAll(Collection)</li><li>java.util.Set#addAll(Collection)</li></ul></div>
<p>&nbsp;</p>
<div>
<p><strong>Decorator:</strong><br />为一个对象动态的加上一系列的动作，而不需要因为这些动作的不同而产生大量的继承类。这个模式在JDK中几乎无处不在，所以，下面的列表只是一些典型的。</p>
<ul><li>java.io.BufferedInputStream(InputStream)</li><li>java.io.DataInputStream(InputStream)</li><li>java.io.BufferedOutputStream(OutputStream)</li><li>java.util.zip.ZipOutputStream(OutputStream)</li><li>java.util.Collections#checked[List|Map|Set|SortedSet|SortedMap]()</li></ul>
<p><strong>Facade:</strong><br />用一个简单的接口包状一组组件，接口，抽象或是子系统。</p>
<ul><li>java.lang.Class</li><li>javax.faces.webapp.FacesServlet</li></ul>
<p><strong>Flyweight:</strong><br />有效率地存储大量的小的对象。</p>
<ul><li>java.lang.Integer#valueOf(int)</li><li>java.lang.Boolean#valueOf(boolean)</li><li>java.lang.Byte#valueOf(byte)</li><li>java.lang.Character#valueOf(char)</li></ul>
<p><strong>Proxy:</strong><br />用一个简单的对象来代替一个复杂的对象。</p>
<ul><li>java.lang.reflect.Proxy</li><li>RMI</li></ul></div>
<div>
<h4><strong><span style="text-decoration: underline">Creational（创建模式）</span></strong></h4></div>
<div><strong>Abstract factory:</strong><br />创建一组有关联的对象实例。这个模式在JDK中也是相当的常见，还有很多的framework例如Spring。我们很容易找到这样的实例。 
<ul><li>java.util.Calendar#getInstance()</li><li>java.util.Arrays#asList()</li><li>java.util.ResourceBundle#getBundle()</li><li>java.sql.DriverManager#getConnection()</li><li>java.sql.Connection#createStatement()</li><li>java.sql.Statement#executeQuery()</li><li>java.text.NumberFormat#getInstance()</li><li>javax.xml.transform.TransformerFactory#newInstance()</li></ul>
<p><strong>Builder:</strong><br />主要用来简化一个复杂的对象的创建。这个模式也可以用来实现一个&nbsp;<a hideFocus href="http://en.wikipedia.org/wiki/Fluent_interface" target="_blank">Fluent Interface</a>。</p>
<ul><li>java.lang.StringBuilder#append()</li><li>java.lang.StringBuffer#append()</li><li>java.sql.PreparedStatement</li><li>javax.swing.GroupLayout.Group#addComponent()</li></ul>
<p><strong>Factory:</strong><br />简单来说，按照需求返回一个类型的实例。</p>
<ul><li>java.lang.Proxy#newProxyInstance()</li><li>java.lang.Object#toString()</li><li>java.lang.Class#newInstance()</li><li>java.lang.reflect.Array#newInstance()</li><li>java.lang.reflect.Constructor#newInstance()</li><li>java.lang.Boolean#valueOf(String)</li><li>java.lang.Class#forName()</li></ul>
<p><strong>Prototype:</strong><br />使用自己的实例创建另一个实例。有时候，创建一个实例然后再把已有实例的值拷贝过去，是一个很复杂的动作。所以，使用这个模式可以避免这样的复杂性。</p>
<ul><li>java.lang.Object#clone()</li><li>java.lang.Cloneable</li></ul>
<p><strong>Singleton:</strong><br />只允许一个实例。在 Effective Java中建议使用Emun.</p>
<ul><li>java.lang.Runtime#getRuntime()</li><li>java.awt.Toolkit#getDefaultToolkit()</li><li>java.awt.GraphicsEnvironment#getLocalGraphicsEnvironment()</li><li>java.awt.Desktop#getDesktop()</li></ul>
<h4><strong><span style="text-decoration: underline">Behavioral(行为模式)</span></strong></h4>
<p><strong>Chain of responsibility:</strong><br />把一个对象在一个链接传递直到被处理。在这个链上的所有的对象有相同的接口（抽象类）但却有不同的实现。</p>
<ul><li>java.util.logging.Logger#log()</li><li>javax.servlet.Filter#doFilter()</li></ul>
<p><strong>Command:</strong><br />把一个或一些命令封装到一个对象中。</p>
<ul><li>java.lang.Runnable</li><li>javax.swing.Action</li></ul>
<p><strong>Interpreter:</strong><br />一个语法解释器的模式。</p>
<ul><li>java.util.Pattern</li><li>java.text.Normalizer</li><li>java.text.Format</li></ul>
<p><strong>Iterator:</strong><br />提供一种一致的方法来顺序遍历一个容器中的所有元素。</p>
<ul><li>java.util.Iterator</li><li>java.util.Enumeration</li></ul>
<p><strong>Mediator:</strong><br />用来减少对象单的直接通讯的依赖关系。使用一个中间类来管理消息的方向。</p>
<ul><li>java.util.Timer</li><li>java.util.concurrent.Executor#execute()</li><li>java.util.concurrent.ExecutorService#submit()</li><li>java.lang.reflect.Method#invoke()</li></ul>
<p><strong>Memento:</strong><br />给一个对象的状态做一个快照。Date类在内部使用了一个long型来做这个快照。</p>
<ul><li>java.util.Date</li><li>java.io.Serializable</li></ul>
<p><strong>Null Object:</strong><br />这个模式用来解决如果一个Collection中没有元素的情况。</p>
<ul><li>java.util.Collections#emptyList()</li><li>java.util.Collections#emptyMap()</li><li>java.util.Collections#emptySet()</li></ul>
<p><strong>Observer:</strong><br />允许一个对象向所有的侦听的对象广播自己的消息或事件。</p>
<ul><li>java.util.EventListener</li><li>javax.servlet.http.HttpSessionBindingListener</li><li>javax.servlet.http.HttpSessionAttributeListener</li><li>javax.faces.event.PhaseListener</li></ul>
<p><strong>State:</strong><br />这个模式允许你可以在运行时很容易地根据自身内部的状态改变对象的行为。</p>
<ul><li>java.util.Iterator</li><li>javax.faces.lifecycle.LifeCycle#execute()</li></ul>
<p><strong>Strategy:</strong><br />定义一组算法，并把其封装到一个对象中。然后在运行时，可以灵活的使用其中的一个算法。</p>
<ul><li>java.util.Comparator#compare()</li><li>javax.servlet.http.HttpServlet</li><li>javax.servlet.Filter#doFilter()</li></ul>
<p><strong>Template method:</strong><br />允许子类重载部分父类而不需要完全重写。</p>
<ul><li>java.util.Collections#sort()</li><li>java.io.InputStream#skip()</li><li>java.io.InputStream#read()</li><li>java.util.AbstractList#indexOf()</li></ul>
<p><strong>Visitor:</strong></p>
<p>作用于某个对象群中各个对象的操作. 它可以使你在不改变这些对象本身的情况下,定义作用于这些对象的新操作.</p>
<ul><li>javax.lang.model.element.Element 和javax.lang.model.element.ElementVisitor</li><li>javax.lang.model.type.TypeMirror 和javax.lang.model.type.TypeVisitor</li></ul></div><img src ="http://www.blogjava.net/soken/aggbug/353750.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/soken/" target="_blank">soken</a> 2011-07-05 23:02 <a href="http://www.blogjava.net/soken/articles/353750.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Spring AOP 详解</title><link>http://www.blogjava.net/soken/articles/351773.html</link><dc:creator>soken</dc:creator><author>soken</author><pubDate>Sun, 05 Jun 2011 06:49:00 GMT</pubDate><guid>http://www.blogjava.net/soken/articles/351773.html</guid><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 切面类TestAspect Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package&nbsp;com.spring.aop;/**&nbsp;*//**&nbsp;*&nbsp;切面&nbsp;*&nbsp;*/publ...&nbsp;&nbsp;<a href='http://www.blogjava.net/soken/articles/351773.html'>阅读全文</a><img src ="http://www.blogjava.net/soken/aggbug/351773.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/soken/" target="_blank">soken</a> 2011-06-05 14:49 <a href="http://www.blogjava.net/soken/articles/351773.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>分页工具类</title><link>http://www.blogjava.net/soken/articles/345089.html</link><dc:creator>soken</dc:creator><author>soken</author><pubDate>Thu, 24 Feb 2011 09:32:00 GMT</pubDate><guid>http://www.blogjava.net/soken/articles/345089.html</guid><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: package&nbsp;test;import&nbsp;java.util.List;public&nbsp;class&nbsp;Pager&lt;T&gt;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;List&lt;...&nbsp;&nbsp;<a href='http://www.blogjava.net/soken/articles/345089.html'>阅读全文</a><img src ="http://www.blogjava.net/soken/aggbug/345089.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/soken/" target="_blank">soken</a> 2011-02-24 17:32 <a href="http://www.blogjava.net/soken/articles/345089.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JUnit 4 使用 Java 5 中的注解（annotation)</title><link>http://www.blogjava.net/soken/articles/342631.html</link><dc:creator>soken</dc:creator><author>soken</author><pubDate>Sun, 09 Jan 2011 11:24:00 GMT</pubDate><guid>http://www.blogjava.net/soken/articles/342631.html</guid><wfw:comment>http://www.blogjava.net/soken/comments/342631.html</wfw:comment><comments>http://www.blogjava.net/soken/articles/342631.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/soken/comments/commentRss/342631.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/soken/services/trackbacks/342631.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;只有注册用户登录后才能阅读该文。<a href='http://www.blogjava.net/soken/articles/342631.html'>阅读全文</a><img src ="http://www.blogjava.net/soken/aggbug/342631.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/soken/" target="_blank">soken</a> 2011-01-09 19:24 <a href="http://www.blogjava.net/soken/articles/342631.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>