1 19 20 package org.netbeans.spi.registry; 21 22 import org.netbeans.api.registry.*; 23 import org.netbeans.modules.registry.ApiContextFactory; 24 import org.netbeans.modules.registry.mergedctx.RootContextImpl; 25 26 32 public final class SpiUtils { 33 34 private SpiUtils() { 35 } 36 37 42 public static Context createContext(BasicContext ctx) { 43 return ApiContextFactory.DEFAULT.createContext(ctx); 44 } 45 46 53 public static ContextException createContextException(BasicContext ctx, String str) { 54 return ApiContextFactory.DEFAULT.createContextException(ctx, str); 55 } 56 57 65 public static SubcontextEvent createSubcontextEvent(BasicContext source, String subcontextName, int type) { 66 return ApiContextFactory.DEFAULT.createSubcontextEvent(source, subcontextName, type); 67 } 68 69 78 public static BindingEvent createBindingEvent(BasicContext source, String bindingName, int type) { 79 return ApiContextFactory.DEFAULT.createBindingEvent(source, bindingName, type); 80 } 81 82 93 public static AttributeEvent createAttributeEvent(BasicContext source, String bindingName, String attributeName, int type) { 94 return ApiContextFactory.DEFAULT.createAttributeEvent(source, bindingName, attributeName, type); 95 } 96 97 105 public static ObjectRef createObjectRef (BasicContext rootContext, String absoluteContextName, String bindingName) { 106 return ApiContextFactory.DEFAULT.createObjectRef(rootContext, absoluteContextName, bindingName); 107 } 108 109 115 public static ObjectRef createObjectRef (BasicContext context, String bindingName) { 116 return ApiContextFactory.DEFAULT.createObjectRef(context, bindingName); 117 } 118 119 125 public static BasicContext merge (MergedContextProvider mergeProvider) { 126 return RootContextImpl.create(mergeProvider); 127 } 128 } 129 | Popular Tags |