在软件系统中,经常面临着“某个对象”的创建工作,由于需求的变化,这个对象的具体实现经常面临着剧烈的变化,但是它却拥有比较稳定的接口。如何应对这种变化?提供一种封装机制来隔离出“这个易变对象”的变化,从而保持系统中“其它依赖该对象的对象”不随着需求的改变而改变?这就是要说的Factory
Method...
分类:
其他好文 时间:
2014-05-26 21:10:26
阅读次数:
269
在《Pragmatic Ajax A Web 2.0 Primer
》中对readyStae状态的介绍,摘译如下:0: (Uninitialized) the send( ) method has not yet been
invoked.1: (Loading) the send( ) metho...
分类:
其他好文 时间:
2014-05-26 20:46:09
阅读次数:
293
报错:Access restriction: The method
decodeBuffer(String) from the type CharacterDecoder is not accessible due to
restriction on required libraryAccess r...
分类:
数据库 时间:
2014-05-26 07:30:24
阅读次数:
279
code如下:
//Longest common sequence, dynamic programming method
void FindLCS(char *str1, char *str2)
{
if(str1 == NULL || str2 == NULL)
return;
int length1 = strlen(str1)+1;
int length2 = strlen(...
分类:
其他好文 时间:
2014-05-26 04:56:50
阅读次数:
215
作者:zccst看一下是如何写的jQuery.extend({prop:""method:function(){}});可以看出,这些方法是jQuery的静态属性和方法(也即是工具方法),将来既可以直接提供给用户使用,也可以在内部使用。具体实现的工具属性和方法有(同时也标注了哪些在内部使用)jQue...
分类:
Web程序 时间:
2014-05-26 01:55:03
阅读次数:
218
能够分析类的功能的程序称为反射程序,反射机制的功能相当强大,几个基本的应用是:
在运行时分析各种类的功能; 在运行时对对象进行分析... 实现繁星数组操作的代码 使用Method方法就像使用C++中的函数指针一样;1. Class
类:当程序运行时,Java运行时系统...
分类:
编程语言 时间:
2014-05-26 00:53:53
阅读次数:
398
一、入门篇
Java RMI指的是远程方法调用(Remote Method Invocation). 它是一种机制, 能够让不同操作系统之间程序实现方法调用.
比如: 一个EJB可以通过RMI调用web上另一台机器上的EJB远程方法(EJB底层就是使用RMI).
二、RMI和webservice
RMI是在TCP协议上传递可序列化的Java对象, 只能...
分类:
编程语言 时间:
2014-05-25 00:33:36
阅读次数:
340
//通过循环可以获得注解中的name值@Column(name="EO_XXX"),本方法获取的是get方法的注解Method[]methods=EoOrderMaterielModel.class.getMethods();Map<String,String>modelColumns=newHashMap<String,String>();for(Methodm:methods){Annotationats[]=m.getAnnota..
分类:
数据库 时间:
2014-05-24 16:34:29
阅读次数:
304
public void doSave(IProgressMonitor monitor) { //
TODO Auto-generated method stub performSave(monitor, getEditorInput());
getCommandStack()...
分类:
编程语言 时间:
2014-05-24 10:30:59
阅读次数:
365
如果可变字符串操作较多的话,用STRINGBUILDER显然优势得多。public class
HelloJava { public static void main(String[] args) { // TODO Auto-generated
method stub ...
分类:
编程语言 时间:
2014-05-24 09:00:10
阅读次数:
328