org.eclipse.wst.jsdt.core
Class Flags

java.lang.Object
  extended by org.eclipse.wst.jsdt.core.Flags

public final class Flags
extends java.lang.Object

Utility class for decoding modifier flags in JavaScript elements.

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

See Also:
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Field Summary
static int AccAbstract
          Abstract property flag.
static int AccAnnotation
           
static int AccBridge
           
static int AccDefault
          Constant representing the absence of any flag
static int AccDeprecated
          Deprecated property flag.
static int AccEnum
           
static int AccFinal
           
static int AccInterface
          Interface property flag.
static int AccNative
           
static int AccPrivate
          Private access flag.
static int AccProtected
          Protected access flag.
static int AccPublic
          Public access flag.
static int AccStatic
          Static access flag.
static int AccStrictfp
          Strictfp property flag.
static int AccSuper
          Super property flag.
static int AccSynchronized
           
static int AccSynthetic
           
static int AccTransient
           
static int AccVarargs
          = Varargs method property Used to flag variable arity method declarations.
static int AccVolatile
           
 
Method Summary
static boolean isAbstract(int flags)
          Returns whether the given integer includes the abstract modifier.
static boolean isAnnotation(int flags)
           
static boolean isBridge(int flags)
           
static boolean isDeprecated(int flags)
          Returns whether the given integer includes the indication that the element is deprecated (@deprecated tag in jsdoc comment).
static boolean isEnum(int flags)
           
static boolean isFinal(int flags)
           
static boolean isInterface(int flags)
          Returns whether the given integer includes the interface modifier.
static boolean isNative(int flags)
           
static boolean isPackageDefault(int flags)
           
static boolean isPrivate(int flags)
          Returns whether the given integer includes the private modifier.
static boolean isProtected(int flags)
          Returns whether the given integer includes the protected modifier.
static boolean isPublic(int flags)
          Returns whether the given integer includes the public modifier.
static boolean isStatic(int flags)
          Returns whether the given integer includes the static modifier.
static boolean isStrictfp(int flags)
           
static boolean isSuper(int flags)
          Returns whether the given integer includes the super modifier.
static boolean isSynchronized(int flags)
           
static boolean isSynthetic(int flags)
           
static boolean isTransient(int flags)
           
static boolean isVarargs(int flags)
           
static boolean isVolatile(int flags)
           
static java.lang.String toString(int flags)
          Returns a standard string describing the given modifier flags.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AccDefault

public static final int AccDefault
Constant representing the absence of any flag

See Also:
Constant Field Values

AccPublic

public static final int AccPublic
Public access flag. This flag only applies to ECMAScript 4 which is not yet supported

See Also:
Constant Field Values

AccPrivate

public static final int AccPrivate
Private access flag. This flag only applies to ECMAScript 4 which is not yet supported

See Also:
Constant Field Values

AccProtected

public static final int AccProtected
Protected access flag. This flag only applies to ECMAScript 4 which is not yet supported

See Also:
Constant Field Values

AccStatic

public static final int AccStatic
Static access flag.

See Also:
Constant Field Values

AccFinal

public static final int AccFinal
See Also:
Constant Field Values

AccSynchronized

public static final int AccSynchronized
See Also:
Constant Field Values

AccVolatile

public static final int AccVolatile
See Also:
Constant Field Values

AccTransient

public static final int AccTransient
See Also:
Constant Field Values

AccNative

public static final int AccNative
See Also:
Constant Field Values

AccInterface

public static final int AccInterface
Interface property flag. This flag only applies to ECMAScript 4 which is not yet supported

See Also:
Constant Field Values

AccAbstract

public static final int AccAbstract
Abstract property flag. This flag only applies to ECMAScript 4 which is not yet supported

See Also:
Constant Field Values

AccStrictfp

public static final int AccStrictfp
Strictfp property flag.

See Also:
Constant Field Values

AccSuper

public static final int AccSuper
Super property flag. This flag only applies to ECMAScript 4 which is not yet supported

See Also:
Constant Field Values

AccSynthetic

public static final int AccSynthetic
See Also:
Constant Field Values

AccDeprecated

public static final int AccDeprecated
Deprecated property flag.

See Also:
Constant Field Values

AccBridge

public static final int AccBridge
See Also:
Constant Field Values

AccVarargs

public static final int AccVarargs
= Varargs method property Used to flag variable arity method declarations. This flag only applies to ECMAScript 4 which is not yet supported

See Also:
Constant Field Values

AccEnum

public static final int AccEnum
See Also:
Constant Field Values

AccAnnotation

public static final int AccAnnotation
See Also:
Constant Field Values
Method Detail

isAbstract

public static boolean isAbstract(int flags)
Returns whether the given integer includes the abstract modifier.

Note: This Method only applies to ECMAScript 4 which is not yet supported

Parameters:
flags - the flags
Returns:
true if the abstract modifier is included

isDeprecated

public static boolean isDeprecated(int flags)
Returns whether the given integer includes the indication that the element is deprecated (@deprecated tag in jsdoc comment).

Parameters:
flags - the flags
Returns:
true if the element is marked as deprecated

isFinal

public static boolean isFinal(int flags)

isInterface

public static boolean isInterface(int flags)
Returns whether the given integer includes the interface modifier.

Note: This Method only applies to ECMAScript 4 which is not yet supported

Parameters:
flags - the flags
Returns:
true if the interface modifier is included

isNative

public static boolean isNative(int flags)

isPackageDefault

public static boolean isPackageDefault(int flags)

isPrivate

public static boolean isPrivate(int flags)
Returns whether the given integer includes the private modifier.

Note: This Method only applies to ECMAScript 4 which is not yet supported

Parameters:
flags - the flags
Returns:
true if the private modifier is included

isProtected

public static boolean isProtected(int flags)
Returns whether the given integer includes the protected modifier.

Note: This Method only applies to ECMAScript 4 which is not yet supported

Parameters:
flags - the flags
Returns:
true if the protected modifier is included

isPublic

public static boolean isPublic(int flags)
Returns whether the given integer includes the public modifier.

Note: This Method only applies to ECMAScript 4 which is not yet supported

Parameters:
flags - the flags
Returns:
true if the public modifier is included

isStatic

public static boolean isStatic(int flags)
Returns whether the given integer includes the static modifier.

Parameters:
flags - the flags
Returns:
true if the static modifier is included

isSuper

public static boolean isSuper(int flags)
Returns whether the given integer includes the super modifier.

Note: This Method only applies to ECMAScript 4 which is not yet supported

Parameters:
flags - the flags
Returns:
true if the super modifier is included

isStrictfp

public static boolean isStrictfp(int flags)

isSynchronized

public static boolean isSynchronized(int flags)

isSynthetic

public static boolean isSynthetic(int flags)

isTransient

public static boolean isTransient(int flags)

isVolatile

public static boolean isVolatile(int flags)

isBridge

public static boolean isBridge(int flags)

isVarargs

public static boolean isVarargs(int flags)

isEnum

public static boolean isEnum(int flags)

isAnnotation

public static boolean isAnnotation(int flags)

toString

public static java.lang.String toString(int flags)
Returns a standard string describing the given modifier flags. Only modifier flags are included in the output; deprecated, synthetic, bridge, etc. flags are ignored.

The flags are output in the following order:

   public protected private
   static
   abstract final native synchronized transient volatile strictfp
 

Examples results:

          "public static final"
          "private native"
 

Parameters:
flags - the flags
Returns:
the standard string representation of the given flags