'Factory Example 1'에 해당되는 글 1건

  1. 2010.02.19 Factory Example 1
반응형
import org.apache.commons.collections.Factory;
import org.apache.commons.collections.FactoryUtils;

public class FactoryExampleV1 {
  public static void main(String args[]) {
    Factory bufferFactory = FactoryUtils.instantiateFactory(StringBuffer.class,
                          new Class[] {String.class},
                          new Object[] {"a string"});
    System.err.println(bufferFactory.create());
  }
}
Posted by 1010