1 14 package org.w3c.css.sac.helpers; 15 16 import org.w3c.css.sac.Parser; 17 18 22 public class ParserFactory { 23 24 27 public Parser makeParser() 28 throws ClassNotFoundException , 29 IllegalAccessException , 30 InstantiationException , 31 NullPointerException , 32 ClassCastException { 33 String className = System.getProperty("org.w3c.css.sac.parser"); 34 if (className == null) { 35 throw new NullPointerException ("No value for sac.parser property"); 36 } 37 return (Parser)(Class.forName(className).newInstance()); 38 } 39 } 40 | Popular Tags |