PatternFactory-Java