1 19 20 package org.netbeans.api.registry; 21 22 import org.netbeans.modules.registry.ApiContextFactory; 23 import org.netbeans.spi.registry.BasicContext; 24 25 29 30 final class ApiContextFactoryImpl extends ApiContextFactory { 33 ApiContextFactoryImpl() { 34 } 35 36 public Context createContext(BasicContext ctx) { 37 return Context.getApiContext(ctx); 38 } 39 40 public ContextException createContextException(BasicContext ctx, String str) { 41 return new ContextException(createContext(ctx), str); 42 } 43 44 public SubcontextEvent createSubcontextEvent(BasicContext source, String subcontextName, int type) { 45 return new SubcontextEvent(createContext(source), subcontextName, type); 46 } 47 48 public BindingEvent createBindingEvent(BasicContext source, String bindingName, int type) { 49 return new BindingEvent(createContext(source), bindingName, type); 50 } 51 52 public AttributeEvent createAttributeEvent(BasicContext source, String bindingName, String attributeName, int type) { 53 return new AttributeEvent(createContext(source), bindingName, attributeName, type); 54 } 55 56 57 public ObjectRef createObjectRef (BasicContext rootCtx, String ctxName, String bindingName) { 58 return new ObjectRef(createContext(rootCtx), ctxName, bindingName); 59 } 60 public ObjectRef createObjectRef (BasicContext ctx, String bindingName) { 61 return new ObjectRef(createContext(ctx), bindingName); 62 } 63 64 public BasicContext getBasicContext(Context ctx) { 65 return ctx.delegate; 66 } 67 68 } 69 | Popular Tags |