Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/java/lang/reflect/Modifier#constants) \| [Ctors](https://developer.android.com/reference/java/lang/reflect/Modifier#pubctors) \| [Methods](https://developer.android.com/reference/java/lang/reflect/Modifier#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/lang/reflect/Modifier#inhmethods)

# Modifier

` public class Modifier `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | java.lang.reflect.Modifier |

<br />

*** ** * ** ***

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://developer.android.com/reference/java/lang/Class#getModifiers()`
- `https://developer.android.com/reference/java/lang/reflect/Member#getModifiers()`

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#ABSTRACT` The `int` value representing the `abstract` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#FINAL` The `int` value representing the `final` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#INTERFACE` The `int` value representing the `interface` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#NATIVE` The `int` value representing the `native` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#PRIVATE` The `int` value representing the `private` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#PROTECTED` The `int` value representing the `protected` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#PUBLIC` The `int` value representing the `public` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#STATIC` The `int` value representing the `static` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#STRICT` The `int` value representing the `strictfp` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#SYNCHRONIZED` The `int` value representing the `synchronized` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#TRANSIENT` The `int` value representing the `transient` modifier. |
| `int` | `https://developer.android.com/reference/java/lang/reflect/Modifier#VOLATILE` The `int` value representing the `volatile` modifier. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/java/lang/reflect/Modifier#Modifier()() ` |

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

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### ABSTRACT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ABSTRACT
```

The `int` value representing the `abstract` modifier.

<br />

Constant Value: 1024 (0x00000400)

### FINAL

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FINAL
```

The `int` value representing the `final` modifier.

<br />

Constant Value: 16 (0x00000010)

### INTERFACE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int INTERFACE
```

The `int` value representing the `interface` modifier.

<br />

Constant Value: 512 (0x00000200)

### NATIVE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NATIVE
```

The `int` value representing the `native` modifier.

<br />

Constant Value: 256 (0x00000100)

### PRIVATE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PRIVATE
```

The `int` value representing the `private` modifier.

<br />

Constant Value: 2 (0x00000002)

### PROTECTED

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTED
```

The `int` value representing the `protected` modifier.

<br />

Constant Value: 4 (0x00000004)

### PUBLIC

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PUBLIC
```

The `int` value representing the `public` modifier.

<br />

Constant Value: 1 (0x00000001)

### STATIC

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATIC
```

The `int` value representing the `static` modifier.

<br />

Constant Value: 8 (0x00000008)

### STRICT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STRICT
```

The `int` value representing the `strictfp` modifier.

<br />

Constant Value: 2048 (0x00000800)

### SYNCHRONIZED

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SYNCHRONIZED
```

The `int` value representing the `synchronized` modifier.

<br />

Constant Value: 32 (0x00000020)

### TRANSIENT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TRANSIENT
```

The `int` value representing the `transient` modifier.

<br />

Constant Value: 128 (0x00000080)

### VOLATILE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int VOLATILE
```

The `int` value representing the `volatile` modifier.

<br />

Constant Value: 64 (0x00000040)

## Public constructors

### Modifier

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Modifier ()
```

<br />

<br />

## Public methods

### classModifiers

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int classModifiers ()
```

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

<br />

| Returns ||
|---|---|
| `int` | an `int` value OR-ing together the source language modifiers that can be applied to a class. <br /> |

### constructorModifiers

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int constructorModifiers ()
```

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

<br />

| Returns ||
|---|---|
| `int` | an `int` value OR-ing together the source language modifiers that can be applied to a constructor. <br /> |

### fieldModifiers

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int fieldModifiers ()
```

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

<br />

| Returns ||
|---|---|
| `int` | an `int` value OR-ing together the source language modifiers that can be applied to a field. <br /> |

### interfaceModifiers

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int interfaceModifiers ()
```

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

<br />

| Returns ||
|---|---|
| `int` | an `int` value OR-ing together the source language modifiers that can be applied to an interface. <br /> |

### isAbstract

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isAbstract (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `abstract` modifier; `false` otherwise. <br /> |

### isFinal

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isFinal (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `final` modifier; `false` otherwise. <br /> |

### isInterface

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isInterface (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `interface` modifier; `false` otherwise. <br /> |

### isNative

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isNative (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `native` modifier; `false` otherwise. <br /> |

### isPrivate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isPrivate (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `private` modifier; `false` otherwise. <br /> |

### isProtected

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isProtected (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `protected` modifier; `false` otherwise. <br /> |

### isPublic

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isPublic (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `public` modifier; `false` otherwise. <br /> |

### isStatic

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isStatic (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `static` modifier; `false` otherwise. <br /> |

### isStrict

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isStrict (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `strictfp` modifier; `false` otherwise. <br /> |

### isSynchronized

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isSynchronized (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `synchronized` modifier; `false` otherwise. <br /> |

### isTransient

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isTransient (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `transient` modifier; `false` otherwise. <br /> |

### isVolatile

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isVolatile (int mod)
```

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

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `mod` includes the `volatile` modifier; `false` otherwise. <br /> |

### methodModifiers

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int methodModifiers ()
```

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

<br />

| Returns ||
|---|---|
| `int` | an `int` value OR-ing together the source language modifiers that can be applied to a method. <br /> |

### parameterModifiers

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int parameterModifiers ()
```

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

<br />

| Returns ||
|---|---|
| `int` | an `int` value OR-ing together the source language modifiers that can be applied to a parameter. <br /> |

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static String 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://developer.android.com/reference/java/lang/reflect/Modifier#constructorModifiers()` or `https://developer.android.com/reference/java/lang/reflect/Modifier#methodModifiers()`.

<br />

<br />

| Parameters ||
|---|---|
| `mod` | `int`: a set of modifiers <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the set of modifiers represented by `mod` <br /> |