public Class<?> findClass(String name) { IOpenClass openClass = openLConfiguration.getType(DEFAULT_OPENL_NAMESPACE, name); if (openClass != null) { return openClass.getInstanceClass(); } return null; }
public IOpenCast getCast(IOpenClass from, IOpenClass to) { IOpenCast cast = typeCastFactory == null ? null : typeCastFactory.getCast(from, to, configurationContext); if (cast != null) { return cast; } return parent == null ? null : parent.getCast(from, to); }
public synchronized IGrammar getGrammar() throws OpenConfigurationException { if (grammarFactory == null) { return parent.getGrammar(); } else { return (IGrammar) grammarFactory.getResource(configurationContext); } }
private IConfigurableResourceContext getConfigurationContext(IOpenLConfiguration extendsConfiguration, IUserContext ucxt) { ClassLoader parentLoader = extendsConfiguration == null ? OpenL.class.getClassLoader() : extendsConfiguration.getConfigurationContext().getClassLoader(); if (!inheritExtendedConfigurationLoader) { parentLoader = ucxt.getUserClassLoader(); } return new ConfigurableResourceContext(parentLoader, conf); }
public INodeBinder getNodeBinder(ISyntaxNode node) { INodeBinder binder = binderFactory == null ? null : binderFactory.getNodeBinder(node, configurationContext); if (binder != null) { return binder; } return parent == null ? NotExistNodeBinder.the : parent.getNodeBinder(node); }
public IOpenField getVar(String namespace, String name, boolean strictMatch) { IOpenField field = methodFactory == null ? null : methodFactory .getVar(namespace, name, configurationContext, strictMatch); if (field != null) { return field; } return parent == null ? null : parent.getVar(namespace, name, strictMatch); }
public IOpenMethod[] getMethods(String namespace, String name) { IOpenMethod[] mcs = methodFactory == null ? new IOpenMethod[] {} : methodFactory.getMethods(namespace, name, configurationContext); IOpenMethod[] pmcs = parent == null ? new IOpenMethod[] {} : parent.getMethods(namespace, name);
private IConfigurableResourceContext getConfigurationContext(IOpenLConfiguration extendsConfiguration, IUserContext ucxt) { ClassLoader parentLoader = extendsConfiguration == null ? OpenL.class.getClassLoader() : extendsConfiguration.getConfigurationContext().getClassLoader(); if (!inheritExtendedConfigurationLoader) { parentLoader = ucxt.getUserClassLoader(); } return new ConfigurableResourceContext(parentLoader, conf); }
public INodeBinder getNodeBinder(ISyntaxNode node) { INodeBinder binder = binderFactory == null ? null : binderFactory.getNodeBinder(node, configurationContext); if (binder != null) { return binder; } return parent == null ? NotExistNodeBinder.the : parent.getNodeBinder(node); }
public IOpenField getVar(String namespace, String name, boolean strictMatch) { IOpenField field = methodFactory == null ? null : methodFactory .getVar(namespace, name, configurationContext, strictMatch); if (field != null) { return field; } return parent == null ? null : parent.getVar(namespace, name, strictMatch); }
public IOpenMethod[] getMethods(String namespace, String name) { IOpenMethod[] mcs = methodFactory == null ? new IOpenMethod[] {} : methodFactory.getMethods(namespace, name, configurationContext); IOpenMethod[] pmcs = parent == null ? new IOpenMethod[] {} : parent.getMethods(namespace, name);
IConfigurableResourceContext getConfigurationContext(IOpenLConfiguration extendsConfiguration) throws Exception { ClassLoader parentLoader = extendsConfiguration == null ? ClassLoaderFactory.getOpenlCoreLoader(null) : extendsConfiguration.getConfigurationContext().getClassLoader(); ClassLoader myClassLoader = parentLoader; if (classpath != null && classpath.trim().length() != 0) { String baseDir = getProject().getBaseDir().getCanonicalPath(); UserContext ucxt = new UserContext(null, baseDir); myClassLoader = ClassLoaderFactory.createUserClassloader(category, classpath, parentLoader, ucxt); } else { myClassLoader = AntOpenLBuilder.userCxt.top().getUserClassLoader(); } return new ConfigurableResourceContext(myClassLoader, conf); }
public IOpenClass getType(String namespace, String name) { Map<String, IOpenClass> namespaceCache = cache.get(namespace); if (namespaceCache == null) { namespaceCache = new HashMap<String, IOpenClass>(); cache.put(namespace, namespaceCache); } if (namespaceCache.containsKey(name)) { return namespaceCache.get(name); } IOpenClass type = typeFactory == null ? null : typeFactory.getType(namespace, name, configurationContext); if (type != null) { namespaceCache.put(name, type); return type; } if (parent == null) { namespaceCache.put(name, null); return null; } else { type = parent.getType(namespace, name); namespaceCache.put(name, type); return type; } }
public IOpenCast getCast(IOpenClass from, IOpenClass to) { IOpenCast cast = typeCastFactory == null ? null : typeCastFactory.getCast(from, to, configurationContext); if (cast != null) { return cast; } return parent == null ? null : parent.getCast(from, to); }
public synchronized IGrammar getGrammar() throws OpenConfigurationException { if (grammarFactory == null) { return parent.getGrammar(); } else { return (IGrammar) grammarFactory.getResource(configurationContext); } }
public IOpenClass getType(String namespace, String name) { Map<String, IOpenClass> namespaceCache = cache.get(namespace); if (namespaceCache == null) { namespaceCache = new HashMap<String, IOpenClass>(); cache.put(namespace, namespaceCache); } if (namespaceCache.containsKey(name)) { return namespaceCache.get(name); } IOpenClass type = typeFactory == null ? null : typeFactory.getType(namespace, name, configurationContext); if (type != null) { namespaceCache.put(name, type); return type; } if (parent == null) { namespaceCache.put(name, null); return null; } else { type = parent.getType(namespace, name); namespaceCache.put(name, type); return type; } }