Eclipse JDT
2.0

org.eclipse.jdt.core.dom
Class Modifier

java.lang.Object
  |
  +--org.eclipse.jdt.core.dom.Modifier

public final class Modifier
extends Object

Modifier flags. The numeric values of these flags match the ones for class files as described in the Java Virtual Machine Specification.

 Modifier:
    public
    protected
    private
    static
    abstract
    final
    native
    synchronized
    transient
    volatile
    strictfp
 

This class provides constants and static methods only; it is not intended to be instantiated or subclassed.

Since:
2.0

Field Summary
static int ABSTRACT
          "abstract" modifier constant (bit mask).
static int FINAL
          "final" modifier constant (bit mask).
static int NATIVE
          "native" modifier constant (bit mask).
static int NONE
          Modifier constant (bit mask, value 0) indicating no modifiers.
static int PRIVATE
          "private" modifier constant (bit mask).
static int PROTECTED
          "protected" modifier constant (bit mask).
static int PUBLIC
          "public" modifier constant (bit mask).
static int STATIC
          "static" modifier constant (bit mask).
static int STRICTFP
          "strictfp" modifier constant (bit mask).
static int SYNCHRONIZED
          "synchronized" modifier constant (bit mask).
static int TRANSIENT
          "transient" modifier constant (bit mask).
static int VOLATILE
          "volatile" modifier constant (bit mask).
 
Method Summary
static boolean isAbstract(int flags)
          Returns whether the given flags includes the "abstract" modifier.
static boolean isFinal(int flags)
          Returns whether the given flags includes the "final" modifier.
static boolean isNative(int flags)
          Returns whether the given flags includes the "native" modifier.
static boolean isPrivate(int flags)
          Returns whether the given flags includes the "private" modifier.
static boolean isProtected(int flags)
          Returns whether the given flags includes the "protected" modifier.
static boolean isPublic(int flags)
          Returns whether the given flags includes the "public" modifier.
static boolean isStatic(int flags)
          Returns whether the given flags includes the "static" modifier.
static boolean isStrictfp(int flags)
          Returns whether the given flags includes the "strictfp" modifier.
static boolean isSynchronized(int flags)
          Returns whether the given flags includes the "synchronized" modifier.
static boolean isTransient(int flags)
          Returns whether the given flags includes the "transient" modifier.
static boolean isVolatile(int flags)
          Returns whether the given flags includes the "volatile" modifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static int NONE
Modifier constant (bit mask, value 0) indicating no modifiers.


PUBLIC

public static int PUBLIC
"public" modifier constant (bit mask). Applicable to types, methods, constructors, and fields.


PRIVATE

public static int PRIVATE
"private" modifier constant (bit mask). Applicable to types, methods, constructors, and fields.


PROTECTED

public static int PROTECTED
"protected" modifier constant (bit mask). Applicable to types, methods, constructors, and fields.


STATIC

public static int STATIC
"static" modifier constant (bit mask). Applicable to types, methods, fields, and initializers.


FINAL

public static int FINAL
"final" modifier constant (bit mask). Applicable to types, methods, fields, and variables.


SYNCHRONIZED

public static int SYNCHRONIZED
"synchronized" modifier constant (bit mask). Applicable only to methods.


VOLATILE

public static int VOLATILE
"volatile" modifier constant (bit mask). Applicable only to fields.


TRANSIENT

public static int TRANSIENT
"transient" modifier constant (bit mask). Applicable only to fields.


NATIVE

public static int NATIVE
"native" modifier constant (bit mask). Applicable only to methods.


ABSTRACT

public static int ABSTRACT
"abstract" modifier constant (bit mask). Applicable to types and methods.


STRICTFP

public static int STRICTFP
"strictfp" modifier constant (bit mask). Applicable to types and methods.

Method Detail

isPublic

public static boolean isPublic(int flags)
Returns whether the given flags includes the "public" modifier. Applicable to types, methods, constructors, and fields.

Parameters:
flags - the modifier flags
Returns:
true if the PUBLIC bit is set, and false otherwise

isPrivate

public static boolean isPrivate(int flags)
Returns whether the given flags includes the "private" modifier. Applicable to types, methods, constructors, and fields.

Parameters:
flags - the modifier flags
Returns:
true if the PRIVATE bit is set, and false otherwise

isProtected

public static boolean isProtected(int flags)
Returns whether the given flags includes the "protected" modifier. Applicable to types, methods, constructors, and fields.

Parameters:
flags - the modifier flags
Returns:
true if the PROTECTED bit is set, and false otherwise

isStatic

public static boolean isStatic(int flags)
Returns whether the given flags includes the "static" modifier. Applicable to types, methods, fields, and initializers.

Parameters:
flags - the modifier flags
Returns:
true if the STATIC bit is set, and false otherwise

isFinal

public static boolean isFinal(int flags)
Returns whether the given flags includes the "final" modifier. Applicable to types, methods, fields, and variables.

Parameters:
flags - the modifier flags
Returns:
true if the FINAL bit is set, and false otherwise

isSynchronized

public static boolean isSynchronized(int flags)
Returns whether the given flags includes the "synchronized" modifier. Applicable only to methods.

Parameters:
flags - the modifier flags
Returns:
true if the SYNCHRONIZED bit is set, and false otherwise

isVolatile

public static boolean isVolatile(int flags)
Returns whether the given flags includes the "volatile" modifier. Applicable only to fields.

Parameters:
flags - the modifier flags
Returns:
true if the VOLATILE bit is set, and false otherwise

isTransient

public static boolean isTransient(int flags)
Returns whether the given flags includes the "transient" modifier. Applicable only to fields.

Parameters:
flags - the modifier flags
Returns:
true if the TRANSIENT bit is set, and false otherwise

isNative

public static boolean isNative(int flags)
Returns whether the given flags includes the "native" modifier. Applicable only to methods.

Parameters:
flags - the modifier flags
Returns:
true if the NATIVE bit is set, and false otherwise

isAbstract

public static boolean isAbstract(int flags)
Returns whether the given flags includes the "abstract" modifier. Applicable to types and methods.

Parameters:
flags - the modifier flags
Returns:
true if the ABSTRACT bit is set, and false otherwise

isStrictfp

public static boolean isStrictfp(int flags)
Returns whether the given flags includes the "strictfp" modifier. Applicable to types and methods.

Parameters:
flags - the modifier flags
Returns:
true if the STRICTFP bit is set, and false otherwise

Eclipse JDT
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.