public TypeFactoryConfiguration createTypes() { TypeFactoryConfiguration mf = new TypeFactoryConfiguration(); conf.setTypeFactory(mf); return mf; }
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 synchronized void validate(IConfigurableResourceContext cxt) throws OpenConfigurationException { if (grammarFactory != null) { grammarFactory.validate(cxt); } else if (parent == null) { throw new OpenConfigurationException("Grammar class is not set", getUri(), null); } if (binderFactory != null) { binderFactory.validate(cxt); } else if (parent == null) { throw new OpenConfigurationException("Bindings are not set", getUri(), null); } // Methods and casts are optional // else if (parent == null) // throw new OpenConfigurationException("Methods are not set", getUri(), // null); if (methodFactory != null) { methodFactory.validate(cxt); } if (typeCastFactory != null) { typeCastFactory.validate(cxt); } if (typeFactory != null) { typeFactory.validate(cxt); } if (openFactories != null) { for (IOpenFactoryConfiguration factory : openFactories.values()) { factory.validate(cxt); } } }
public synchronized void validate(IConfigurableResourceContext cxt) throws OpenConfigurationException { if (grammarFactory != null) { grammarFactory.validate(cxt); } else if (parent == null) { throw new OpenConfigurationException("Grammar class is not set", getUri(), null); } if (binderFactory != null) { binderFactory.validate(cxt); } else if (parent == null) { throw new OpenConfigurationException("Bindings are not set", getUri(), null); } // Methods and casts are optional // else if (parent == null) // throw new OpenConfigurationException("Methods are not set", getUri(), // null); if (methodFactory != null) { methodFactory.validate(cxt); } if (typeCastFactory != null) { typeCastFactory.validate(cxt); } if (typeFactory != null) { typeFactory.validate(cxt); } if (openFactories != null) { for (IOpenFactoryConfiguration factory : openFactories.values()) { factory.validate(cxt); } } }
types.addConfiguredTypeLibrary(typelibrary);
public TypeFactoryConfiguration createTypes() { TypeFactoryConfiguration mf = new TypeFactoryConfiguration(); conf.setTypeFactory(mf); return mf; }
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; } }
types.addConfiguredTypeLibrary(typelibrary);
public TypeFactoryConfiguration createTypes() { TypeFactoryConfiguration mf = new TypeFactoryConfiguration(); conf.setTypeFactory(mf); return mf; }
typelibrary.addConfiguration(javaimport4); types.addConfiguredTypeLibrary(typelibrary);