# Modifier

public class **Modifier** extends [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)  
The Modifier class provides `static` methods and
constants to decode class and member access modifiers. The sets of
modifiers are represented as integers with distinct bit positions
representing different modifiers. The values for the constants
representing the modifiers are taken from the tables in sections 4.1, 4.4, 4.5, and 4.7 of
The Java™ Virtual Machine Specification.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html#getModifiers()`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Member.html#getModifiers()`

### Constant Summary

|---|---|---|
| int | [ABSTRACT](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#ABSTRACT) | The `int` value representing the `abstract` modifier. |
| int | [FINAL](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#FINAL) | The `int` value representing the `final` modifier. |
| int | [INTERFACE](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#INTERFACE) | The `int` value representing the `interface` modifier. |
| int | [NATIVE](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#NATIVE) | The `int` value representing the `native` modifier. |
| int | [PRIVATE](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#PRIVATE) | The `int` value representing the `private` modifier. |
| int | [PROTECTED](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#PROTECTED) | The `int` value representing the `protected` modifier. |
| int | [PUBLIC](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#PUBLIC) | The `int` value representing the `public` modifier. |
| int | [STATIC](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#STATIC) | The `int` value representing the `static` modifier. |
| int | [STRICT](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#STRICT) | The `int` value representing the `strictfp` modifier. |
| int | [SYNCHRONIZED](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#SYNCHRONIZED) | The `int` value representing the `synchronized` modifier. |
| int | [TRANSIENT](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#TRANSIENT) | The `int` value representing the `transient` modifier. |
| int | [VOLATILE](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#VOLATILE) | The `int` value representing the `volatile` modifier. |

### Public Constructor Summary

|---|---|
|   | [Modifier](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#Modifier())() |

### Public Method Summary

|---|---|
| static int | [classModifiers](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#classModifiers())() Return an `int` value OR-ing together the source language modifiers that can be applied to a class. |
| static int | [constructorModifiers](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#constructorModifiers())() Return an `int` value OR-ing together the source language modifiers that can be applied to a constructor. |
| static int | [fieldModifiers](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#fieldModifiers())() Return an `int` value OR-ing together the source language modifiers that can be applied to a field. |
| static int | [interfaceModifiers](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#interfaceModifiers())() Return an `int` value OR-ing together the source language modifiers that can be applied to an interface. |
| static boolean | [isAbstract](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isAbstract(int))(int mod) Return `true` if the integer argument includes the `abstract` modifier, `false` otherwise. |
| static boolean | [isFinal](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isFinal(int))(int mod) Return `true` if the integer argument includes the `final` modifier, `false` otherwise. |
| static boolean | [isInterface](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isInterface(int))(int mod) Return `true` if the integer argument includes the `interface` modifier, `false` otherwise. |
| static boolean | [isNative](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isNative(int))(int mod) Return `true` if the integer argument includes the `native` modifier, `false` otherwise. |
| static boolean | [isPrivate](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isPrivate(int))(int mod) Return `true` if the integer argument includes the `private` modifier, `false` otherwise. |
| static boolean | [isProtected](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isProtected(int))(int mod) Return `true` if the integer argument includes the `protected` modifier, `false` otherwise. |
| static boolean | [isPublic](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isPublic(int))(int mod) Return `true` if the integer argument includes the `public` modifier, `false` otherwise. |
| static boolean | [isStatic](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isStatic(int))(int mod) Return `true` if the integer argument includes the `static` modifier, `false` otherwise. |
| static boolean | [isStrict](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isStrict(int))(int mod) Return `true` if the integer argument includes the `strictfp` modifier, `false` otherwise. |
| static boolean | [isSynchronized](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isSynchronized(int))(int mod) Return `true` if the integer argument includes the `synchronized` modifier, `false` otherwise. |
| static boolean | [isTransient](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isTransient(int))(int mod) Return `true` if the integer argument includes the `transient` modifier, `false` otherwise. |
| static boolean | [isVolatile](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#isVolatile(int))(int mod) Return `true` if the integer argument includes the `volatile` modifier, `false` otherwise. |
| static int | [methodModifiers](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#methodModifiers())() Return an `int` value OR-ing together the source language modifiers that can be applied to a method. |
| static int | [parameterModifiers](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#parameterModifiers())() Return an `int` value OR-ing together the source language modifiers that can be applied to a parameter. |
| static [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#toString(int))(int mod) Return a string describing the access modifier flags in the specified modifier. |

### Inherited Method Summary

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

## Constants

#### public static final int
**ABSTRACT**

The `int` value representing the `abstract`
modifier.
Constant Value: 1024

#### public static final int
**FINAL**

The `int` value representing the `final`
modifier.
Constant Value: 16

#### public static final int
**INTERFACE**

The `int` value representing the `interface`
modifier.
Constant Value: 512

#### public static final int
**NATIVE**

The `int` value representing the `native`
modifier.
Constant Value: 256

#### public static final int
**PRIVATE**

The `int` value representing the `private`
modifier.
Constant Value: 2

#### public static final int
**PROTECTED**

The `int` value representing the `protected`
modifier.
Constant Value: 4

#### public static final int
**PUBLIC**

The `int` value representing the `public`
modifier.
Constant Value: 1

#### public static final int
**STATIC**

The `int` value representing the `static`
modifier.
Constant Value: 8

#### public static final int
**STRICT**

The `int` value representing the `strictfp`
modifier.
Constant Value: 2048

#### public static final int
**SYNCHRONIZED**

The `int` value representing the `synchronized`
modifier.
Constant Value: 32

#### public static final int
**TRANSIENT**

The `int` value representing the `transient`
modifier.
Constant Value: 128

#### public static final int
**VOLATILE**

The `int` value representing the `volatile`
modifier.
Constant Value: 64

## Public Constructors

#### public
**Modifier**
()

<br />

## Public Methods

#### public static int
**classModifiers**
()

Return an `int` value OR-ing together the source language
modifiers that can be applied to a class.

##### Returns

- an `int` value OR-ing together the source language modifiers that can be applied to a class.

#### public static int
**constructorModifiers**
()

Return an `int` value OR-ing together the source language
modifiers that can be applied to a constructor.

##### Returns

- an `int` value OR-ing together the source language modifiers that can be applied to a constructor.

#### public static int
**fieldModifiers**
()

Return an `int` value OR-ing together the source language
modifiers that can be applied to a field.

##### Returns

- an `int` value OR-ing together the source language modifiers that can be applied to a field.

#### public static int
**interfaceModifiers**
()

Return an `int` value OR-ing together the source language
modifiers that can be applied to an interface.

##### Returns

- an `int` value OR-ing together the source language modifiers that can be applied to an interface.

#### public static boolean
**isAbstract**
(int mod)

Return `true` if the integer argument includes the
`abstract` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `abstract` modifier; `false` otherwise.

#### public static boolean
**isFinal**
(int mod)

Return `true` if the integer argument includes the
`final` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `final` modifier; `false` otherwise.

#### public static boolean
**isInterface**
(int mod)

Return `true` if the integer argument includes the
`interface` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `interface` modifier; `false` otherwise.

#### public static boolean
**isNative**
(int mod)

Return `true` if the integer argument includes the
`native` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `native` modifier; `false` otherwise.

#### public static boolean
**isPrivate**
(int mod)

Return `true` if the integer argument includes the
`private` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `private` modifier; `false` otherwise.

#### public static boolean
**isProtected**
(int mod)

Return `true` if the integer argument includes the
`protected` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `protected` modifier; `false` otherwise.

#### public static boolean
**isPublic**
(int mod)

Return `true` if the integer argument includes the
`public` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `public` modifier; `false` otherwise.

#### public static boolean
**isStatic**
(int mod)

Return `true` if the integer argument includes the
`static` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `static` modifier; `false` otherwise.

#### public static boolean
**isStrict**
(int mod)

Return `true` if the integer argument includes the
`strictfp` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `strictfp` modifier; `false` otherwise.

#### public static boolean
**isSynchronized**
(int mod)

Return `true` if the integer argument includes the
`synchronized` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `synchronized` modifier; `false` otherwise.

#### public static boolean
**isTransient**
(int mod)

Return `true` if the integer argument includes the
`transient` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `transient` modifier; `false` otherwise.

#### public static boolean
**isVolatile**
(int mod)

Return `true` if the integer argument includes the
`volatile` modifier, `false` otherwise.

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- `true` if `mod` includes the `volatile` modifier; `false` otherwise.

#### public static int
**methodModifiers**
()

Return an `int` value OR-ing together the source language
modifiers that can be applied to a method.

##### Returns

- an `int` value OR-ing together the source language modifiers that can be applied to a method.

#### public static int
**parameterModifiers**
()

Return an `int` value OR-ing together the source language
modifiers that can be applied to a parameter.

##### Returns

- an `int` value OR-ing together the source language modifiers that can be applied to a parameter.

#### public static [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**toString**
(int mod)

Return a string describing the access modifier flags in
the specified modifier. For example:
>
> ```
>     public final synchronized strictfp
>  
> ```
The modifier names are returned in an order consistent with the suggested modifier orderings given in sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1 of The Java™ Language Specification. The full modifier ordering used by this method is: `public protected private abstract static final transient
> volatile synchronized native strictfp
> interface `
The `interface` modifier discussed in this class is not a true modifier in the Java language and it appears after all other modifiers listed by this method. This method may return a string of modifiers that are not valid modifiers of a Java entity; in other words, no checking is done on the possible validity of the combination of modifiers represented by the input. Note that to perform such checking for a known kind of entity, such as a constructor or method, first AND the argument of `toString` with the appropriate mask from a method like `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#constructorModifiers()` or `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/reflect/Modifier.html#methodModifiers()`.

<br />

##### Parameters

| mod | a set of modifiers |
|---|---|

##### Returns

- a string representation of the set of modifiers represented by `mod`