APIdia Launch Partner
Top Description Methods
com.sun.jdi

public Interface Accessible

Known Direct Subinterfaces
com.sun.jdi.ReferenceType, com.sun.jdi.TypeComponent

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.
Authors
Robert Field, Gordon Hirsch, James McIlree
Since
1.3

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true for items with package private access; false otherwise.
isPackagePrivate
()

Determines if this object mirrors a package private item.

public boolean

Returns:

true for items with private access; false otherwise.
isPrivate
()

Determines if this object mirrors a private item.

public boolean

Returns:

true for items with private access; false otherwise.
isProtected
()

Determines if this object mirrors a protected item.

public boolean

Returns:

true for items with public access; false otherwise.
isPublic
()

Determines if this object mirrors a public item.

public int
modifiers()

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

Method Detail

isPackagePrivateback to summary
public 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 java.lang.Integer#TYPE, the return value is always false.

Returns:boolean

true for items with package private access; false otherwise.

isPrivateback to summary
public 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 java.lang.Integer#TYPE, the return value is always false.

Returns:boolean

true for items with private access; false otherwise.

isProtectedback to summary
public 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 java.lang.Integer#TYPE, the return value is always false.

Returns:boolean

true for items with private access; false otherwise.

isPublicback to summary
public 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 java.lang.Integer#TYPE, the return value is always true.

Returns:boolean

true for items with public access; false otherwise.

modifiersback to summary
public int modifiers()

Returns the Java 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(section 4.1), fields(section 4.5), and methods(section 4.6).