JavaScript Development Tools
Release 3.2

org.eclipse.wst.jsdt.core
Class Flags

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

public final class Flags
extends 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 AccDefault
          Constant representing the absence of any flag
static int AccDeprecated
          Deprecated property flag.
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 AccSuper
          Super property flag.
static int AccVarargs
          = Varargs method property Used to flag variable arity method declarations.
 
Method Summary
static boolean isAbstract(int flags)
          Returns whether the given integer includes the abstract modifier.
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 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 isSuper(int flags)
          Returns whether the given integer includes the super modifier.
static boolean isVarargs(int flags)
           
static String toString(int flags)
          Returns a standard string describing the given modifier flags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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

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

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

AccDeprecated

public static final int AccDeprecated
Deprecated property flag.

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
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

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

isVarargs

public static boolean isVarargs(int flags)

toString

public static 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

JavaScript Development Tools
Release 3.2

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