Skip to content

io microsphere reflect Modifier

github-actions[bot] edited this page Mar 21, 2026 · 1 revision

Modifier

Type: Enum | Module: microsphere-java-core | Package: io.microsphere.reflect | Since: 1.0.0

Source: microsphere-java-core/src/main/java/io/microsphere/reflect/Modifier.java

Overview

The enumeration class for Java Reflection java.lang.reflect.Modifier

Declaration

public enum Modifier

Author: Mercy

Version Information

  • Introduced in: 1.0.0
  • Current Project Version: 0.1.10-SNAPSHOT

Version Compatibility

This component is tested and compatible with the following Java versions:

Java Version Status
Java 8 ✅ Compatible
Java 11 ✅ Compatible
Java 17 ✅ Compatible
Java 21 ✅ Compatible
Java 25 ✅ Compatible

Usage

Maven Dependency

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.microsphere-projects</groupId>
    <artifactId>microsphere-java-core</artifactId>
    <version>${microsphere-java.version}</version>
</dependency>

Tip: Use the BOM (microsphere-java-dependencies) for consistent version management. See the Getting Started guide.

Import

import io.microsphere.reflect.Modifier;

API Reference

Public Methods

Method Description
getValue The public modifier.
matches matches the specified modifier
isPublic matches the specified modifiers
isPrivate Checks if the specified modifiers contain the private modifier.
isProtected Checks if the specified modifiers contain the protected modifier.
isStatic Checks if the specified modifiers contain the static modifier.
isFinal Checks if the specified modifiers contain the final modifier.
isSynchronized Checks if the specified modifiers contain the synchronized modifier.
isVolatile Checks if the specified modifiers contain the volatile modifier.
isTransient Checks if the specified modifiers contain the transient modifier.
isNative Checks if the specified modifiers contain the native modifier.
isInterface Checks if the specified modifiers contain the interface modifier.
isAbstract Checks if the specified modifiers contain the abstract modifier.
isStrict Checks if the specified modifiers contain the strict modifier.
isBridge Checks if the specified modifiers contain the bridge modifier.
isVarArgs Checks if the specified modifiers contain the varargs modifier.
isSynthetic Checks if the specified modifiers contain the synthetic modifier.
isAnnotation Checks if the specified modifiers contain the annotation modifier.
isEnum Checks if the specified modifiers contain the enum modifier.
isMandated Checks if the specified modifiers contain the mandated modifier.

Method Details

getValue

public int getValue()

The public modifier. / PUBLIC(java.lang.reflect.Modifier.PUBLIC),

/** The private modifier. / PRIVATE(java.lang.reflect.Modifier.PRIVATE),

/** The protected modifier. / PROTECTED(java.lang.reflect.Modifier.PROTECTED),

/** The static modifier. / STATIC(java.lang.reflect.Modifier.STATIC),

/** The final modifier. / FINAL(java.lang.reflect.Modifier.FINAL),

/** The synchronized modifier. / SYNCHRONIZED(java.lang.reflect.Modifier.SYNCHRONIZED),

/** The volatile modifier. / VOLATILE(java.lang.reflect.Modifier.VOLATILE),

/** The transient modifier. / TRANSIENT(java.lang.reflect.Modifier.TRANSIENT),

/** The native modifier. / NATIVE(java.lang.reflect.Modifier.NATIVE),

/** The interface modifier. / INTERFACE(java.lang.reflect.Modifier.INTERFACE),

/** The abstract modifier. / ABSTRACT(java.lang.reflect.Modifier.ABSTRACT),

/** The strictfp modifier. / STRICT(java.lang.reflect.Modifier.STRICT),

BRIDGE(0x00000040),

VARARGS(0x00000080),

SYNTHETIC(0x00001000),

ANNOTATION(0x00002000),

ENUM(0x00004000),

MANDATED(0x00008000);

private final int value;

Modifier(int value) { this.value = value; }

/** The bit value of modifier

isPrivate

public static boolean isPrivate(int modifiers)

Checks if the specified modifiers contain the private modifier.

isProtected

public static boolean isProtected(int modifiers)

Checks if the specified modifiers contain the protected modifier.

isStatic

public static boolean isStatic(int modifiers)

Checks if the specified modifiers contain the static modifier.

isFinal

public static boolean isFinal(int modifiers)

Checks if the specified modifiers contain the final modifier.

isSynchronized

public static boolean isSynchronized(int modifiers)

Checks if the specified modifiers contain the synchronized modifier.

isVolatile

public static boolean isVolatile(int modifiers)

Checks if the specified modifiers contain the volatile modifier.

isTransient

public static boolean isTransient(int modifiers)

Checks if the specified modifiers contain the transient modifier.

isNative

public static boolean isNative(int modifiers)

Checks if the specified modifiers contain the native modifier.

isInterface

public static boolean isInterface(int modifiers)

Checks if the specified modifiers contain the interface modifier.

isAbstract

public static boolean isAbstract(int modifiers)

Checks if the specified modifiers contain the abstract modifier.

isStrict

public static boolean isStrict(int modifiers)

Checks if the specified modifiers contain the strict modifier.

isBridge

public static boolean isBridge(int modifiers)

Checks if the specified modifiers contain the bridge modifier.

isVarArgs

public static boolean isVarArgs(int modifiers)

Checks if the specified modifiers contain the varargs modifier.

isSynthetic

public static boolean isSynthetic(int modifiers)

Checks if the specified modifiers contain the synthetic modifier.

isAnnotation

public static boolean isAnnotation(int modifiers)

Checks if the specified modifiers contain the annotation modifier.

isEnum

public static boolean isEnum(int modifiers)

Checks if the specified modifiers contain the enum modifier.

isMandated

public static boolean isMandated(int modifiers)

Checks if the specified modifiers contain the mandated modifier.

See Also

  • java.lang.reflect.Modifier

This documentation was auto-generated from the source code of microsphere-java.

Home

java-annotations

java-core

jdk-tools

lang-model

annotation-processor

java-test

Clone this wiki locally