javax.el

Class LambdaExpression

    • Constructor Detail

      • LambdaExpression

        public LambdaExpression(List<String> formalParameters,
                                ValueExpression expression)
        Creates a new LambdaExpression.
        Parameters:
        formalParameters - The list of String representing the formal parameters.
        expression - The ValueExpression representing the body.
    • Method Detail

      • setELContext

        public void setELContext(ELContext context)
        Set the ELContext to use in evaluating the LambdaExpression. The ELContext must to be set prior to the invocation of the LambdaExpression, unless it is supplied with invoke(javax.el.ELContext, java.lang.Object...).
        Parameters:
        context - The ELContext to use in evaluating the LambdaExpression.
      • invoke

        public Object invoke(ELContext elContext,
                             Object... args)
                      throws ELException
        Invoke the encapsulated Lambda expression.

        The supplied arguments are matched, in the same order, to the formal parameters. If there are more arguments than the formal parameters, the extra arguments are ignored. If there are less arguments than the formal parameters, an ELException is thrown.

        The actual Lambda arguments are added to the ELContext and are available during the evaluation of the Lambda expression. They are removed after the evaluation.

        Parameters:
        elContext - The ELContext used for the evaluation of the expression The ELContext set by setELContext(javax.el.ELContext) is ignored.
        args - The arguments to invoke the Lambda expression. For calls with no arguments, an empty array must be provided. A Lambda argument can be null.
        Returns:
        The result of invoking the Lambda expression
        Throws:
        ELException - if not enough arguments are provided
        NullPointerException - is elContext is null
      • invoke

        public Object invoke(Object... args)
        Invoke the encapsulated Lambda expression.

        The supplied arguments are matched, in the same order, to the formal parameters. If there are more arguments than the formal parameters, the extra arguments are ignored. If there are less arguments than the formal parameters, an ELException is thrown.

        The actual Lambda arguments are added to the ELContext and are available during the evaluation of the Lambda expression. They are removed after the evaluation.

        The ELContext set by setELContext(javax.el.ELContext) is used in the evaluation of the lambda Expression.
        Parameters:
        args - The arguments to invoke the Lambda expression. For calls with no arguments, an empty array must be provided. A Lambda argument can be null.
        Returns:
        The result of invoking the Lambda expression
        Throws:
        ELException - if not enough arguments are provided

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

21/08/2025 20:50:42 Cette version de la page est en cache (à la date du 21/08/2025 20:50:42) afin d'accélérer le traitement.
Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.

Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/el/LambdaExpression.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, LambdaExpression (Java(TM) EE 7 Specification APIs)

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.