mcimadamore@1142: /* mcimadamore@1142: * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. mcimadamore@1142: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@1142: * mcimadamore@1142: * This code is free software; you can redistribute it and/or modify it mcimadamore@1142: * under the terms of the GNU General Public License version 2 only, as mcimadamore@1142: * published by the Free Software Foundation. Oracle designates this mcimadamore@1142: * particular file as subject to the "Classpath" exception as provided mcimadamore@1142: * by Oracle in the LICENSE file that accompanied this code. mcimadamore@1142: * mcimadamore@1142: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@1142: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@1142: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@1142: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@1142: * accompanied this code). mcimadamore@1142: * mcimadamore@1142: * You should have received a copy of the GNU General Public License version mcimadamore@1142: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@1142: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@1142: * mcimadamore@1142: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA mcimadamore@1142: * or visit www.oracle.com if you need additional information or have any mcimadamore@1142: * questions. mcimadamore@1142: */ mcimadamore@1142: mcimadamore@1142: package com.sun.source.tree; mcimadamore@1142: mcimadamore@1142: import java.util.List; mcimadamore@1142: mcimadamore@1142: /** mcimadamore@1142: * A tree node for a lambda expression. mcimadamore@1142: * mcimadamore@1142: * For example: mcimadamore@1142: *
mcimadamore@1142:  *   ()->{}
mcimadamore@1142:  *   (List ls)->ls.size()
mcimadamore@1142:  *   (x,y)-> { return x + y; }
mcimadamore@1142:  * 
mcimadamore@1142: */ mcimadamore@1142: public interface LambdaExpressionTree extends ExpressionTree { mcimadamore@1142: mcimadamore@1142: /** mcimadamore@1142: * Lambda expressions come in two forms: (i) expression lambdas, whose body mcimadamore@1142: * is an expression, and (ii) statement lambdas, whose body is a block mcimadamore@1142: */ mcimadamore@1142: public enum BodyKind { mcimadamore@1142: /** enum constant for expression lambdas */ mcimadamore@1142: EXPRESSION, mcimadamore@1142: /** enum constant for statement lambdas */ mcimadamore@1142: STATEMENT; mcimadamore@1142: } mcimadamore@1142: mcimadamore@1142: List getParameters(); mcimadamore@1142: Tree getBody(); mcimadamore@1142: BodyKind getBodyKind(); mcimadamore@1142: }