com.jeffpalm.javaparser
Interface ModifierHolder

All Known Implementing Classes:
AccessNode, ASTAnnotationMethodDeclaration, ASTAnnotationTypeDeclaration, ASTAnnotationTypeMemberDeclaration, ASTClassDeclaration, ASTConstantDeclaration, ASTConstructorDeclaration, ASTEnumDeclaration, ASTFieldDeclaration, ASTInterfaceDeclaration, ASTMethodDeclaration, ASTNestedClassDeclaration, ASTNestedInterfaceDeclaration, ModifierAdapter

public interface ModifierHolder

Holds a description of the modifiers for a field or a class

Since:
jRefactory 2.9.0, created October 16, 2003
Author:
Mike Atkinson

Field Summary
static int ABSTRACT
          The int value representing the abstract modifier.
static int EXPLICIT
          Description of the Field
static int FINAL
          The int value representing the final modifier.
static int INTERFACE
          The int value representing the interface modifier.
static java.lang.String[] names
          Description of the Field
static int NATIVE
          The int value representing the native modifier.
static int PRIVATE
          The int value representing the private modifier.
static int PROTECTED
          The int value representing the protected modifier.
static int PUBLIC
          The int value representing the public modifier.
static int STATIC
          The int value representing the static modifier.
static int STRICTFP
          The int value representing the strictfp modifier.
static int SYNCHRONIZED
          The int value representing the synchronized modifier.
static int TRANSIENT
          The int value representing the transient modifier.
static int VOLATILE
          The int value representing the volatile modifier.
 
Method Summary
 void addModifier(java.lang.String mod)
          Add a modifier
 void copyModifiers(ModifierHolder source)
           
 int getModifiers()
          Gets the modifier bits
 boolean isAbstract()
          Determine if the node is abstract
 boolean isExplicit()
          Determine if the node is explicit
 boolean isFinal()
          Determine if the node is final
 boolean isInterface()
          Determine if the node is interface
 boolean isNative()
          Determine if the node is native
 boolean isPackage()
          Determines if this has package scope
 boolean isPrivate()
          Determine if the node is private
 boolean isProtected()
          Determine if the node is protected
 boolean isPublic()
          Determine if the node is public
 boolean isStatic()
          Determine if the node is static
 boolean isStrictFP()
          Determine if the node is strictFP
 boolean isSynchronized()
          Determine if the node is synchronized
 boolean isTransient()
          Determine if the node is transient
 boolean isVolatile()
          Determine if the node is volatile
 void setAbstract()
          Sets the abstract bit (to true) in the modifiers
 void setAbstract(boolean value)
          Sets the abstract bit in the modifiers
 void setFinal()
          Sets the Final bit (to true) of the in the modifiers
 void setModifiers(int modifiers)
          Sets the modifier bits
 void setPrivate()
          Sets the private bit (to true) in the modifiers
 void setPrivate(boolean value)
          Sets the private bit in the modifiers
 void setProtected()
          Sets the protected bit (to true) in the modifiers
 void setProtected(boolean value)
          Sets the protected bit in the modifiers
 void setPublic()
          Sets the public bit (to true) in the modifiers
 void setPublic(boolean value)
          Sets the public bit in the modifiers
 void setStatic()
          Sets the Static bit (to true) of the in the modifiers
 void setStatic(boolean value)
          Sets the Static bit of the in the modifiers
 void setStrict()
          Sets the StrictFP bit (to true) of the in the modifiers
 void setSynchronized()
          Sets the Synchronized bit (to true) in the modifiers
 void setSynchronized(boolean value)
          Sets the Synchronized bit of the in the modifiers
 

Field Detail

PUBLIC

static final int PUBLIC
The int value representing the public modifier.

See Also:
Constant Field Values

PRIVATE

static final int PRIVATE
The int value representing the private modifier.

See Also:
Constant Field Values

PROTECTED

static final int PROTECTED
The int value representing the protected modifier.

See Also:
Constant Field Values

STATIC

static final int STATIC
The int value representing the static modifier.

See Also:
Constant Field Values

FINAL

static final int FINAL
The int value representing the final modifier.

See Also:
Constant Field Values

SYNCHRONIZED

static final int SYNCHRONIZED
The int value representing the synchronized modifier.

See Also:
Constant Field Values

VOLATILE

static final int VOLATILE
The int value representing the volatile modifier.

See Also:
Constant Field Values

TRANSIENT

static final int TRANSIENT
The int value representing the transient modifier.

See Also:
Constant Field Values

NATIVE

static final int NATIVE
The int value representing the native modifier.

See Also:
Constant Field Values

INTERFACE

static final int INTERFACE
The int value representing the interface modifier.

See Also:
Constant Field Values

ABSTRACT

static final int ABSTRACT
The int value representing the abstract modifier.

See Also:
Constant Field Values

STRICTFP

static final int STRICTFP
The int value representing the strictfp modifier.

See Also:
Constant Field Values

EXPLICIT

static final int EXPLICIT
Description of the Field

See Also:
Constant Field Values

names

static final java.lang.String[] names
Description of the Field

Method Detail

getModifiers

int getModifiers()
Gets the modifier bits

Returns:
the modifier bits

setModifiers

void setModifiers(int modifiers)
Sets the modifier bits

Parameters:
modifiers - the modifier bits

setPrivate

void setPrivate(boolean value)
Sets the private bit in the modifiers

Parameters:
value - true if we are setting the private modifier

setPrivate

void setPrivate()
Sets the private bit (to true) in the modifiers


setProtected

void setProtected(boolean value)
Sets the protected bit in the modifiers

Parameters:
value - true if we are setting the protected modifier

setProtected

void setProtected()
Sets the protected bit (to true) in the modifiers


setPublic

void setPublic(boolean value)
Sets the public bit in the modifiers

Parameters:
value - true if we are setting the public modifier

setPublic

void setPublic()
Sets the public bit (to true) in the modifiers


setAbstract

void setAbstract(boolean value)
Sets the abstract bit in the modifiers

Parameters:
value - true if we are setting the modifier

setAbstract

void setAbstract()
Sets the abstract bit (to true) in the modifiers


setSynchronized

void setSynchronized(boolean value)
Sets the Synchronized bit of the in the modifiers

Parameters:
value - The new Synchronized value

setSynchronized

void setSynchronized()
Sets the Synchronized bit (to true) in the modifiers


setStatic

void setStatic(boolean value)
Sets the Static bit of the in the modifiers

Parameters:
value - The new Static value

setStatic

void setStatic()
Sets the Static bit (to true) of the in the modifiers


setFinal

void setFinal()
Sets the Final bit (to true) of the in the modifiers


setStrict

void setStrict()
Sets the StrictFP bit (to true) of the in the modifiers


isAbstract

boolean isAbstract()
Determine if the node is abstract

Returns:
true if this stores an ABSTRACT flag

isExplicit

boolean isExplicit()
Determine if the node is explicit

Returns:
true if this stores an EXPLICIT flag

isFinal

boolean isFinal()
Determine if the node is final

Returns:
true if this stores an FINAL flag

isInterface

boolean isInterface()
Determine if the node is interface

Returns:
true if this stores an INTERFACE flag

isNative

boolean isNative()
Determine if the node is native

Returns:
true if this stores an NATIVE flag

isPrivate

boolean isPrivate()
Determine if the node is private

Returns:
true if this stores an PRIVATE flag

isProtected

boolean isProtected()
Determine if the node is protected

Returns:
true if this stores an PROTECTED flag

isPublic

boolean isPublic()
Determine if the node is public

Returns:
true if this stores an PUBLIC flag

isStatic

boolean isStatic()
Determine if the node is static

Returns:
true if this stores an static flag

isStrictFP

boolean isStrictFP()
Determine if the node is strictFP

Returns:
true if this stores an STRICTFP flag

isSynchronized

boolean isSynchronized()
Determine if the node is synchronized

Returns:
true if this stores an SYNCHRONIZED flag

isTransient

boolean isTransient()
Determine if the node is transient

Returns:
true if this stores an TRANSIENT flag

isVolatile

boolean isVolatile()
Determine if the node is volatile

Returns:
true if this stores an VOLATILE flag

isPackage

boolean isPackage()
Determines if this has package scope

Returns:
true if this has package scope

addModifier

void addModifier(java.lang.String mod)
Add a modifier

Parameters:
mod - the new modifier

copyModifiers

void copyModifiers(ModifierHolder source)