1 19 package org.netbeans.api.xmi.sax; 20 21 import org.netbeans.api.xmi.XMIInputConfig; 22 import org.openide.util.Lookup; 23 import java.util.Collection ; 24 25 30 public abstract class XMIConsumerFactory { 31 34 public static XMIConsumerFactory getDefault() { 35 Lookup.Result result = Lookup.getDefault().lookup( 36 new Lookup.Template(XMIConsumerFactory.class) 37 ); 38 Collection instances = result.allInstances(); 39 return (instances.size() > 0 ? (XMIConsumerFactory) result.allInstances().iterator().next() : null); 40 } 41 42 45 public abstract XMIConsumer createXMIConsumer(); 46 47 53 public abstract XMIConsumer createXMIConsumer(XMIInputConfig configuration); 54 } 55 | Popular Tags |