Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/jdi/Accessible.java
38831 views
/*1* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package com.sun.jdi;2627/**28* Provides information on the accessibility of a type or type component.29* Mirrors for program elements which allow an30* an access specifier (private, protected, public) provide information31* on that part of the declaration through this interface.32*33* @author Robert Field34* @author Gordon Hirsch35* @author James McIlree36* @since 1.337*/38@jdk.Exported39public interface Accessible {4041/**42* Returns the Java<sup><font size=-2>TM</font></sup>43* programming language modifiers, encoded in an integer.44* <p>45* The modifier encodings are defined in46* <cite>The Java™ Virtual Machine Specification</cite>47* in the <code>access_flag</code> tables for classes(section 4.1), fields(section 4.5), and methods(section 4.6).48*/49public int modifiers();5051/**52* Determines if this object mirrors a private item.53* For {@link ArrayType}, the return value depends on the54* array component type. For primitive arrays the return value55* is always false. For object arrays, the return value is the56* same as would be returned for the component type.57* For primitive classes, such as {@link java.lang.Integer#TYPE},58* the return value is always false.59*60* @return <code>true</code> for items with private access;61* <code>false</code> otherwise.62*/63boolean isPrivate();6465/**66* Determines if this object mirrors a package private item.67* A package private item is declared with no access specifier.68* For {@link ArrayType}, the return value depends on the69* array component type. For primitive arrays the return value70* is always false. For object arrays, the return value is the71* same as would be returned for the component type.72* For primitive classes, such as {@link java.lang.Integer#TYPE},73* the return value is always false.74*75* @return <code>true</code> for items with package private access;76* <code>false</code> otherwise.77*/78boolean isPackagePrivate();7980/**81* Determines if this object mirrors a protected item.82* For {@link ArrayType}, the return value depends on the83* array component type. For primitive arrays the return value84* is always false. For object arrays, the return value is the85* same as would be returned for the component type.86* For primitive classes, such as {@link java.lang.Integer#TYPE},87* the return value is always false.88*89* @return <code>true</code> for items with private access;90* <code>false</code> otherwise.91*/92boolean isProtected();9394/**95* Determines if this object mirrors a public item.96* For {@link ArrayType}, the return value depends on the97* array component type. For primitive arrays the return value98* is always true. For object arrays, the return value is the99* same as would be returned for the component type.100* For primitive classes, such as {@link java.lang.Integer#TYPE},101* the return value is always true.102*103* @return <code>true</code> for items with public access;104* <code>false</code> otherwise.105*/106boolean isPublic();107}108109110