sample code :
A a = new A("Hello Vincent");
Field field = a.getClass().getDeclaredField("a");
field.setAccessible(true);
System.out.println(field.get(a).toString());
星期三, 五月 09, 2007
星期二, 五月 01, 2007
Design Patterns - Null Object Pattern
Design Patterns - Visitor Pattern
Use the Visitor Pattern when you want to add capabilities to a composite of objects and encapsulation is not important.