Path: blob/master/src/jdk.jdi/share/classes/com/sun/jdi/Accessible.java
41159 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*/38public interface Accessible {3940/**41* Returns the Java programming language modifiers, encoded42* in an integer.43* <p>44* The modifier encodings are defined in45* <cite>The Java Virtual Machine Specification</cite>46* in the <code>access_flag</code> tables for classes(section 4.1), fields(section 4.5), and methods(section 4.6).47*/48public int modifiers();4950/**51* Determines if this object mirrors a private item.52* For {@link ArrayType}, the return value depends on the53* array component type. For primitive arrays the return value54* is always false. For object arrays, the return value is the55* same as would be returned for the component type.56* For primitive classes, such as {@link java.lang.Integer#TYPE},57* the return value is always false.58*59* @return <code>true</code> for items with private access;60* <code>false</code> otherwise.61*/62boolean isPrivate();6364/**65* Determines if this object mirrors a package private item.66* A package private item is declared with no access specifier.67* For {@link ArrayType}, the return value depends on the68* array component type. For primitive arrays the return value69* is always false. For object arrays, the return value is the70* same as would be returned for the component type.71* For primitive classes, such as {@link java.lang.Integer#TYPE},72* the return value is always false.73*74* @return <code>true</code> for items with package private access;75* <code>false</code> otherwise.76*/77boolean isPackagePrivate();7879/**80* Determines if this object mirrors a protected item.81* For {@link ArrayType}, the return value depends on the82* array component type. For primitive arrays the return value83* is always false. For object arrays, the return value is the84* same as would be returned for the component type.85* For primitive classes, such as {@link java.lang.Integer#TYPE},86* the return value is always false.87*88* @return <code>true</code> for items with private access;89* <code>false</code> otherwise.90*/91boolean isProtected();9293/**94* Determines if this object mirrors a public item.95* For {@link ArrayType}, the return value depends on the96* array component type. For primitive arrays the return value97* is always true. For object arrays, the return value is the98* same as would be returned for the component type.99* For primitive classes, such as {@link java.lang.Integer#TYPE},100* the return value is always true.101*102* @return <code>true</code> for items with public access;103* <code>false</code> otherwise.104*/105boolean isPublic();106}107108109