Partager via


Class.Modifiers Property

Definition

Returns the Java language modifiers for this class or interface, encoded in an integer.

public int Modifiers { [Android.Runtime.Register("getModifiers", "()I", "")] get; }
[<get: Android.Runtime.Register("getModifiers", "()I", "")>]
member this.Modifiers : int

Property Value

the int representing the modifiers for this class

Attributes

Remarks

Returns the Java language modifiers for this class or interface, encoded in an integer. The modifiers consist of the Java Virtual Machine's constants for public, protected, private, final, static, abstract and interface; they should be decoded using the methods of class Modifier.

If the underlying class is an array class, then its public, private and protected modifiers are the same as those of its component type. If this Class represents a primitive type or void, its public modifier is always true, and its protected and private modifiers are always false. If this object represents an array class, a primitive type or void, then its final modifier is always true and its interface modifier is always false. The values of its other modifiers are not determined by this specification.

The modifier encodings are defined in <em>The Java Virtual Machine Specification</em>, table 4.1.

Added in 1.1.

Java documentation for java.lang.Class.getModifiers().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to