SynchronizedTree.java revision 3193:3b3bea483542
162053Smarkm/*
2254147Sobrien * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
3128059Smarkm * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
462053Smarkm *
562053Smarkm * This code is free software; you can redistribute it and/or modify it
662053Smarkm * under the terms of the GNU General Public License version 2 only, as
762053Smarkm * published by the Free Software Foundation.  Oracle designates this
862053Smarkm * particular file as subject to the "Classpath" exception as provided
962053Smarkm * by Oracle in the LICENSE file that accompanied this code.
1062053Smarkm *
1162053Smarkm * This code is distributed in the hope that it will be useful, but WITHOUT
1262053Smarkm * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1362053Smarkm * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1462053Smarkm * version 2 for more details (a copy is included in the LICENSE file that
1562053Smarkm * accompanied this code).
1662053Smarkm *
1762053Smarkm * You should have received a copy of the GNU General Public License version
1862053Smarkm * 2 along with this work; if not, write to the Free Software Foundation,
1962053Smarkm * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2062053Smarkm *
2162053Smarkm * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2262053Smarkm * or visit www.oracle.com if you need additional information or have any
2362053Smarkm * questions.
2462053Smarkm */
2562053Smarkm
2662053Smarkmpackage com.sun.source.tree;
2762053Smarkm
2862053Smarkm/**
29119418Sobrien * A tree node for a {@code synchronized} statement.
30119418Sobrien *
31119418Sobrien * For example:
3262053Smarkm * <pre>
3362053Smarkm *   synchronized ( <em>expression</em> )
3476166Smarkm *       <em>block</em>
3562053Smarkm * </pre>
3676166Smarkm *
3774771Smarkm * @jls section 14.19
3862053Smarkm *
3974072Smarkm * @author Peter von der Ah&eacute;
4076166Smarkm * @author Jonathan Gibbons
4162053Smarkm * @since 1.6
42129876Sphk */
4376166Smarkmpublic interface SynchronizedTree extends StatementTree {
4467112Smarkm    /**
45164033Srwatson     * Returns the expression on which to synchronize.
4683366Sjulian     * @return the expression
4770834Swollman     */
4876166Smarkm    ExpressionTree getExpression();
4976166Smarkm
5074072Smarkm    /**
5162053Smarkm     * Returns the block of the {@code synchronized} statement.
5274072Smarkm     * @return the block
5362053Smarkm     */
54255362Smarkm    BlockTree getBlock();
5574072Smarkm}
5662053Smarkm