Returns a generator by it's name.

@param generatorName
Name to find.

@return The generator.

@throws GeneratorNotFoundException
No generator with the given name was found.
163376
@Nullable
    public final GeneratorConfig findByName(@NotEmpty final String generatorName) throws GeneratorNotFoundException {
        Contract.requireArgNotEmpty("generatorName", generatorName);
        final int idx = list.indexOf(new GeneratorConfig(generatorName, "dummy", "dummy"));
        if (idx < 0) {
            throw new GeneratorNotFoundException(generatorName);
        }
        return list.get(idx);
    }
1216907
def lookupByName(self, name):
        
        res = yield queue.executeInThread(self.connection.lookupByName, name)
        return self.DomainClass(self, res)
935641
public static Aggregator get(final String name) {
    final Aggregator agg = aggregators.get(name);
    if (agg != null) {
      return agg;
    }
    throw new NoSuchElementException("No such aggregator: " + name);
  }
344470
def generator(name):
		
		name = name.upper()
		if name not in WHash.__hash_map__.keys():
			raise ValueError('Hash generator "%s" not available' % name)
		return WHash.__hash_map__[name]
961584
public void setGeneratorProjectName(String generatorProjectName) {
		if (generatorProjectName == null || "".equals(generatorProjectName.trim())) {
			return;
		}
		this.generatorProjectName = generatorProjectName.trim();
	}
1049367
public function generator($className)
    {
        foreach ($this->generators as $generator) {
            if ($generator->supports($className)) {
                return $generator->createGenerator($className);
            }
        }

        return false;
    }
782863
def getReferenceSetByName(self, name):
        
        if name not in self._referenceSetNameMap:
            raise exceptions.ReferenceSetNameNotFoundException(name)
        return self._referenceSetNameMap[name]
849533
@Nullable
    public final Folder findTargetFolder(@NotEmpty final String generatorName, @NotEmpty final String artifactName) {
        Contract.requireArgNotEmpty("generatorName", generatorName);
        Contract.requireArgNotEmpty("artifactName", artifactName);
        if (parent == null) {
            throw new IllegalStateException("Parent for generators is not set");
        }
        try {
            return parent.findTargetFolder(generatorName, artifactName);
        } catch (final ProjectNameNotDefinedException ex) {
            throw new RuntimeException(
                    "Couldn't determine target folder for generator '" + generatorName + "' and artifact '" + artifactName + "'", ex);
        } catch (final ArtifactNotFoundException ex) {
            throw new RuntimeException(
                    "Couldn't determine target folder for generator '" + generatorName + "' and artifact '" + artifactName + "'", ex);
        } catch (final FolderNameNotDefinedException ex) {
            throw new RuntimeException(
                    "Couldn't determine target folder for generator '" + generatorName + "' and artifact '" + artifactName + "'", ex);
        } catch (final GeneratorNotFoundException ex) {
            throw new RuntimeException(
                    "Couldn't determine target folder for generator '" + generatorName + "' and artifact '" + artifactName + "'", ex);
        } catch (final ProjectNotFoundException ex) {
            throw new RuntimeException(
                    "Couldn't determine target folder for generator '" + generatorName + "' and artifact '" + artifactName + "'", ex);
        } catch (final FolderNotFoundException ex) {
            throw new RuntimeException(
                    "Couldn't determine target folder for generator '" + generatorName + "' and artifact '" + artifactName + "'", ex);
        }
    }
945225
public IGeneratorSet getGeneratorSet()
    {
    return
      getType() == JSON?
      new GeneratorSetJsonReader( open()).getGeneratorSet() :

      new GeneratorSetDocReader( open()).getGeneratorSet();
    }
823683
@Override
    @FFDCIgnore(ClassNotFoundException.class)
    protected final Class<?> findClass(String name) throws ClassNotFoundException {
        if (transformers.isEmpty()) {
            Class<?> clazz = null;
            Object token = ThreadIdentityManager.runAsServer();
            try {
                synchronized (getClassLoadingLock(name)) {
                    // This method may be invoked directly instead of via loadClass
                    // (e.g. when doing a "shallow" scan of the common library classloaders).
                    // So we first must check whether we've already defined/loaded the class.
                    // Otherwise we'll get a LinkageError on the second findClass call because
                    // it will attempt to define the class a 2nd time.
                    clazz = findLoadedClass(name);
                    if (clazz == null) {
                        ByteResourceInformation byteResInfo = this.findClassBytes(name);
                        clazz = definePackageAndClass(name, byteResInfo, byteResInfo.getBytes());
                    }
                }
            } catch (ClassNotFoundException cnfe) {
                // Check the common libraries.
                clazz = findClassCommonLibraryClassLoaders(name);
            } finally {
                ThreadIdentityManager.reset(token);
            }
            return clazz;
        }

        ByteResourceInformation byteResourceInformation;
        try {
            byteResourceInformation = findClassBytes(name);
        } catch (ClassNotFoundException cnfe) {
            // Check the common libraries.
            return findClassCommonLibraryClassLoaders(name);
        }

        byte[] bytes = transformClassBytes(byteResourceInformation.getBytes(), name);
        

        return definePackageAndClass(name, byteResourceInformation, bytes);
    }
368670
public GeneratorSetBuilder generator( String functionName, ITestCaseGenerator generator)
    {
    generatorSet_.addGenerator( functionName, generator);
    return this;
    }
791245
def get_id_generator(self, name):
        
        atomic_long = self.get_atomic_long(ID_GENERATOR_ATOMIC_LONG_PREFIX + name)
        return self.proxy.get_or_create(ID_GENERATOR_SERVICE, name, atomic_long=atomic_long)
829433
@CheckReturnValue
    public static <T> FluentGenerator<T> from(@Nonnull Generator<T> generator) {
        return new FluentGenerator<>(generator);
    }
260276
public Widget findChildByName(final String name) {
        final List<Widget> groups = new ArrayList<>();
        groups.add(this);

        return findChildByNameInAllGroups(name, groups);
    }
1081768
public ConnectionPool getPool(String poolName)
            throws ConnectionPoolNotFoundException {
        ConnectionPool connectionPool = null;

        try {
            if (h_ConnectionPools.containsKey(poolName)) {
                connectionPool = h_ConnectionPools.get(poolName);
            } else {
                // Error: pool was never initialized or name could not be found
                throw new ConnectionPoolNotFoundException("Connection pool "
                        + "not found: " + poolName);
            }
        } catch (Throwable th) {
            throw new ConnectionPoolNotFoundException("The specified connection "
                    + "pool \""
                    + poolName
                    + "\" could not be found. The underlying "
                    + "error was a "
                    + th.getClass().getName()
                    + "The message was \""
                    + th.getMessage() + "\".");
        }

        return connectionPool;
    }
1276792
protected SibRaStringGenerator getStringGenerator() {

        final SibRaStringGenerator generator = super.getStringGenerator();
        // The sync here is probably unnecessary (in that a dirty value would probably
        // be accepable), but I'd like to allow findbugs to spot other inconsistent usages
        synchronized(this) {

          generator.addField("remoteConnection", _remoteConnection);

        }
        generator.addField("remoteDestination", _remoteDestination);
        generator.addField("timer", _timer);
        return generator;

    }
1125377
public Class<?> getClassByName(String name) throws ClassNotFoundException {
		Class<?> ret = getClassByNameOrNull(name);
		if (ret == null) {
			throw new ClassNotFoundException("Class " + name + " not found");
		}
		return ret;
	}