<p>succ.</p>

@param transformer a {@link ameba.db.dsl.Transformer} object.
@param result a T object.
@param <T> a T object.
@return a {@link ameba.db.dsl.Transformed} object.
166349
public static <T> Transformed<T> succ(Transformer transformer, T result) {
        return new Basic<>(transformer, result, true);
    }
159062
public static ResultDescriptor ofResult(final AnalyzerResult result) {
        if (result == null) {
            throw new IllegalArgumentException("AnalyzerResult cannot be null");
        }
        return ofResult(result.getClass());
    }
222932
@Override
    public boolean upgradeData(Source source, Result result) {
        final Transformer transformer;
        try {
            transformer = this.upgradeTemplates.newTransformer();
        } catch (TransformerConfigurationException e) {
            throw new RuntimeException(
                    "Failed to create new Transformer from the configured templates: "
                            + this.xslResource,
                    e);
        }

        try {
            transformer.transform(source, result);
        } catch (TransformerException e) {
            throw new RuntimeException(
                    "Failed to upgrade data using XSLT transformation: " + this.xslResource, e);
        }

        return true;
    }
773679
public void transform(Source xmlSource, Result outputTarget, boolean shouldRelease)
          throws TransformerException
  {

    synchronized (m_reentryGuard)
    {
      SerializationHandler xoh = createSerializationHandler(outputTarget);
      this.setSerializationHandler(xoh);        

      m_outputTarget = outputTarget;

      transform(xmlSource, shouldRelease);
    }
  }
1011249
private void performTransform(String xslt, Document document,
                                  Result result)
        throws TransformerException, ConfigurationException, XpathException {
        try {
            StreamSource source = new StreamSource(new StringReader(xslt));
            TransformerFactory tf = XMLUnit.newTransformerFactory();
            ErrorListener el = new ErrorListener() {
                    public void error(TransformerException ex)
                        throws TransformerException {
                        // any error in our simple stylesheet must be fatal
                        throw ex;
                    }
                    public void fatalError(TransformerException ex)
                        throws TransformerException {
                        throw ex;
                    }
                    public void warning(TransformerException ex) {
                        // there shouldn't be any warning
                        ex.printStackTrace();
                    }
                };
            tf.setErrorListener(el);
            Transformer transformer = tf.newTransformer(source);
            // Issue 1985229 says Xalan-J 2.7.0 may return null for
            // illegal input
            if (transformer == null) {
                throw new XpathException("failed to obtain an XSLT transformer"
                                         + " for XPath expression.");
            }
            transformer.setErrorListener(el);
            transformer.transform(new DOMSource(document), result);
        } catch (javax.xml.transform.TransformerConfigurationException ex) {
            throw new ConfigurationException(ex);
        }
    }
362076
public static <P, R> List<R> transform(List<P> elements, Function<P, R> transformer) {
        return Lists.transform(elements, transformer);
    }
891092
public static ResultDescriptor ofResult(final Class<? extends AnalyzerResult> resultClass) {
        ResultDescriptor resultDescriptor = _resultDescriptors.get(resultClass);
        if (resultDescriptor == null) {
            resultDescriptor = new ResultDescriptorImpl(resultClass);
            _resultDescriptors.put(resultClass, resultDescriptor);
        }
        return resultDescriptor;
    }
1145838
public static <T> Observable.Transformer<T,ImmutableList<T>> toImmutableList() {
        return new Observable.Transformer<T, ImmutableList<T>>() {
            @Override
            public Observable<ImmutableList<T>> call(Observable<T> source) {
                return source.collect(new Func0<ImmutableList.Builder<T>>() {
                    @Override
                    public ImmutableList.Builder<T> call() {
                        return ImmutableList.builder();
                    }
                }, new Action2<ImmutableList.Builder<T>, T>() {
                    @Override
                    public void call(ImmutableList.Builder<T> builder, T t) {
                        builder.add(t);
                    }
                })
                .map(new Func1<ImmutableList.Builder<T>, ImmutableList<T>>() {
                    @Override
                    public ImmutableList<T> call(ImmutableList.Builder<T> builder) {
                        return builder.build();
                    }
                });
            }
        };
    }
28930
function getTransformer(name, clientPlugin, pluginOptions) {

    // if in cache, just return it
    if (cache[name]) { return cache[name]; }

    var transformers = clientPlugin.transformers;
    var templateDir = clientPlugin.templateDir;

    // if no transformer, throw error
    if (!transformers[name]) { throw new Error('No transformer called ' + name); }

    // generate all the transformers
    _.each(transformers, function (transformer, transformerName) {
        cache[transformerName] = generateTransformer(transformerName, transformer, templateDir, pluginOptions);
    });

    // return the specific one that was requested
    return cache[name];
}
1310269
public static Transformer newTransformer(Source source, JstlUriResolver uriResolver) throws TransformerConfigurationException {
        TRANSFORMER_FACTORY.setURIResolver(uriResolver);
        Transformer transformer = TRANSFORMER_FACTORY.newTransformer(source);
        // Although newTansformer() is not allowed to return null, Xalan does.
        // Trap that here by throwing the expected TransformerConfigurationException.
        if (transformer == null) {
            throw new TransformerConfigurationException("newTransformer returned null. XSLT may be invalid.");
        }
        return transformer;
    }
924320
public static DispatcherException extractDispatcherException(final StepExecutionResult result) {
        Optional<NodeDispatchStepExecutorExceptionResult>
            extracted =
            extractNodeDispatchStepExecutorExceptionResult(result);
        if (!extracted.isPresent()) {
            throw new IllegalArgumentException("Cannot extract result: unexpected type: " + result);
        }
        return extracted.get().getDispatcherException();
    }
764909
protected <T extends Expression> List<T> transformExpressions(List<? extends Expression> expressions,
            ExpressionTransformer transformer, Class<T> transformedType) {
        List<T> list = new ArrayList<T>(expressions.size());
        for (Expression expr : expressions) {
            Expression transformed = transformer.transform(expr);
            if (!transformedType.isInstance(transformed))
                throw new GroovyBugError(String.format("Transformed expression should have type %s but has type %s",
                    transformedType, transformed.getClass()));
            list.add(transformedType.cast(transformed));
        }
        return list;
    }
226258
public static <P, R> Set<R> transform(Set<P> elements, Function<P, R> transformer) {
        return Sets.newHashSet(transform(newArrayList(elements), transformer));
    }
1268053
@Transformer(from = "java:org.jboss.resteasy.client.core.BaseClientResponse")
    public Item transform(BaseClientResponse<Item> from) {
        from.setReturnType(Item.class);
        return (Item) from.getEntity();
    }
488978
protected <R, T extends Transformer<Transformed<R>>> Iterable<T> getTransformer(Class<T> transformerClass) {
        return Providers.getAllRankedSortedProviders(manager, transformerClass);
    }
11380
function generateTransformer(name, transformerFns, templateDir, pluginOptions) {

    var Transformer = function () {};
    var transformer = new Transformer();

    // add function mixins to the transformer
    _.extend(transformer, transformerFns, baseTransformer, annotationHelper, utensils, pluginOptions);

    // add reference to the template function
    transformer.setTemplate(templateDir, name, pluginOptions.clientType);

    // each transformer can reference each other
    transformer.transformers = cache;

    // return the transformer
    return transformer;
}
655707
public static <A, B, C, D> Converter<Example<A, B>, Example<C, D>> converter(
      Converter<A, C> inputConverter, Converter<B, D> outputConverter) {
    return new ExampleConverter<A, B, C, D>(inputConverter, outputConverter);
  }