public TypeCastFactory createTypeCastFactory() { this.typeCastFactory = new TypeCastFactory(this); return this.typeCastFactory; }
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); }
protected Collection<JavaCastComponent> getAllJavaCastComponents() { Collection<JavaCastComponent> javaCastComponents = new ArrayList<>(); if (typeCastFactory != null) { javaCastComponents.addAll(typeCastFactory.getJavaCastComponents()); } if (parent != null && parent instanceof OpenLConfiguration) { javaCastComponents.addAll(((OpenLConfiguration) parent).getAllJavaCastComponents()); } return javaCastComponents; }
javacast.setClassName(org.openl.binding.impl.cast.CastFactory.class.getName()); typecast.addJavaCast(javacast);
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); } } }
javacast.setClassName(org.openl.binding.impl.cast.CastFactory.class.getName()); typecast.addJavaCast(javacast);
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); } } }
javaCastComponent.setLibraryClassName(libraryName); javaCastComponent.setClassName(org.openl.binding.impl.cast.CastFactory.class.getName()); typeCastFactory.addJavaCast(javaCastComponent);
public TypeCastFactory createTypeCastFactory() { this.typeCastFactory = new TypeCastFactory(this); return this.typeCastFactory; }
protected Collection<JavaCastComponent> getAllJavaCastComponents() { Collection<JavaCastComponent> javaCastComponents = new ArrayList<>(); if (typeCastFactory != null) { javaCastComponents.addAll(typeCastFactory.getJavaCastComponents()); } if (parent != null && parent instanceof OpenLConfiguration) { javaCastComponents.addAll(((OpenLConfiguration) parent).getAllJavaCastComponents()); } return javaCastComponents; }
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); }
javaCastComponent.setLibraryClassName(libraryName); javaCastComponent.setClassName(org.openl.binding.impl.cast.CastFactory.class.getName()); typeCastFactory.addJavaCast(javaCastComponent);
public TypeCastFactory createTypecast() { TypeCastFactory tcf = new TypeCastFactory(); conf.setTypeCastFactory(tcf); return tcf; }
javacast.setLibraryClassName(typeCastClassName); javacast.setClassName(org.openl.binding.impl.cast.CastFactory.class.getName()); typecast.addJavaCast(javacast);