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