public interface

Accessible

com.sun.jdi.Accessible
Known Indirect Subclasses

Class Overview

Provides information on the accessibility of a type or type component. Mirrors for program elements which allow an an access specifier (private, protected, public) provide information on that part of the declaration through this interface.

Summary

Public Methods
abstract boolean isPackagePrivate()
Determines if this object mirrors a package private item.
abstract boolean isPrivate()
Determines if this object mirrors a private item.
abstract boolean isProtected()
Determines if this object mirrors a protected item.
abstract boolean isPublic()
Determines if this object mirrors a public item.
abstract int modifiers()
Returns the JavaTM programming language modifiers, encoded in an integer.

Public Methods

public abstract boolean isPackagePrivate ()

Determines if this object mirrors a package private item. A package private item is declared with no access specifier. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as TYPE, the return value is always false.

Returns
  • true for items with package private access; false otherwise.

public abstract boolean isPrivate ()

Determines if this object mirrors a private item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as TYPE, the return value is always false.

Returns
  • true for items with private access; false otherwise.

public abstract boolean isProtected ()

Determines if this object mirrors a protected item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as TYPE, the return value is always false.

Returns
  • true for items with private access; false otherwise.

public abstract boolean isPublic ()

Determines if this object mirrors a public item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always true. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as TYPE, the return value is always true.

Returns
  • true for items with public access; false otherwise.

public abstract int modifiers ()

Returns the JavaTM programming language modifiers, encoded in an integer.

The modifier encodings are defined in the Java Virtual Machine Specification, in the access_flag tables for classes, fields, and methods.