WithTree.java revision 1204:9597425b6b38
144603Sdcs/*
244603Sdcs * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
344603Sdcs * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
444603Sdcs *
544603Sdcs * This code is free software; you can redistribute it and/or modify it
644603Sdcs * under the terms of the GNU General Public License version 2 only, as
744603Sdcs * published by the Free Software Foundation.  Oracle designates this
844603Sdcs * particular file as subject to the "Classpath" exception as provided
944603Sdcs * by Oracle in the LICENSE file that accompanied this code.
1044603Sdcs *
1144603Sdcs * This code is distributed in the hope that it will be useful, but WITHOUT
1244603Sdcs * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1344603Sdcs * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1444603Sdcs * version 2 for more details (a copy is included in the LICENSE file that
1544603Sdcs * accompanied this code).
1644603Sdcs *
1744603Sdcs * You should have received a copy of the GNU General Public License version
1844603Sdcs * 2 along with this work; if not, write to the Free Software Foundation,
1944603Sdcs * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2044603Sdcs *
2144603Sdcs * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2244603Sdcs * or visit www.oracle.com if you need additional information or have any
2344603Sdcs * questions.
2444603Sdcs */
2550477Speter
2644603Sdcspackage jdk.nashorn.api.tree;
2744603Sdcs
2844603Sdcs/**
2944603Sdcs * A tree node for a 'with' statement.
3044603Sdcs *
3144603Sdcs * For example:
3244603Sdcs * <pre>
3344603Sdcs *   with ( <em>scope</em> )
3444603Sdcs *     <em>statement</em>
3544603Sdcs * </pre>
3644603Sdcs *
3744603Sdcs * @since 1.9
3844603Sdcs */
3944603Sdcs@jdk.Exported
4044603Sdcspublic interface WithTree extends StatementTree {
4144603Sdcs    /**
4244603Sdcs     * The scope object expression for this 'with' statement.
4344603Sdcs     *
4444603Sdcs     * @return the scope object
4544603Sdcs     */
4644603Sdcs    ExpressionTree getScope();
4744603Sdcs
4844603Sdcs    /**
4944603Sdcs     * The statement contained in this 'with' statement.
5044603Sdcs     *
5144603Sdcs     * @return the statement contained
5244603Sdcs     */
5344603Sdcs    StatementTree getStatement();
5444603Sdcs}
5544603Sdcs