com.jeffpalm.javaparser
Class ModifierAdapter

java.lang.Object
  extended by com.jeffpalm.javaparser.ModifierAdapter
All Implemented Interfaces:
ModifierHolder

public class ModifierAdapter
extends java.lang.Object
implements ModifierHolder

Description of the Class

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

Field Summary
protected  int modifiers
          Description of the Field
 
Fields inherited from interface com.jeffpalm.javaparser.ModifierHolder
ABSTRACT, EXPLICIT, FINAL, INTERFACE, names, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICTFP, SYNCHRONIZED, TRANSIENT, VOLATILE
 
Constructor Summary
ModifierAdapter()
           
 
Method Summary
 void addModifier(java.lang.String mod)
          Add a modifier
 void copyModifiers(ModifierHolder source)
          Copies the modifiers from another 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
protected  void setCode(boolean value, int code)
          Sets or resets a single bit in the modifiers
 void setFinal()
          Sets the Final bit (to true) of the in the modifiers
 void setInterface()
          Sets the Final bit (to true) of the in the modifiers
 void setModifiers(int modifiers)
          Sets the modifier bits
 void setNative()
          Sets the Final bit (to true) of the in the modifiers
 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) in the modifiers
 void setStatic(boolean value)
          Sets the Static bit 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 in the modifiers
 void setTransient()
          Sets the Final bit (to true) of the in the modifiers
 void setVolatile()
          Sets the Final bit (to true) of the in the modifiers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modifiers

protected int modifiers
Description of the Field

Constructor Detail

ModifierAdapter

public ModifierAdapter()
Method Detail

setPrivate

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

Specified by:
setPrivate in interface ModifierHolder
Parameters:
value - true if we are setting the private modifier

setPrivate

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

Specified by:
setPrivate in interface ModifierHolder

setProtected

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

Specified by:
setProtected in interface ModifierHolder
Parameters:
value - true if we are setting the protected modifier

setProtected

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

Specified by:
setProtected in interface ModifierHolder

setPublic

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

Specified by:
setPublic in interface ModifierHolder
Parameters:
value - true if we are setting the public modifier

setPublic

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

Specified by:
setPublic in interface ModifierHolder

setAbstract

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

Specified by:
setAbstract in interface ModifierHolder
Parameters:
value - true if we are setting the modifier

setAbstract

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

Specified by:
setAbstract in interface ModifierHolder

setSynchronized

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

Specified by:
setSynchronized in interface ModifierHolder
Parameters:
value - The new Synchronized value

setSynchronized

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

Specified by:
setSynchronized in interface ModifierHolder

setStatic

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

Specified by:
setStatic in interface ModifierHolder
Parameters:
value - The new Static value

setStatic

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

Specified by:
setStatic in interface ModifierHolder

setFinal

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

Specified by:
setFinal in interface ModifierHolder

setVolatile

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


setTransient

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


setNative

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


setInterface

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


setStrict

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

Specified by:
setStrict in interface ModifierHolder

setModifiers

public void setModifiers(int modifiers)
Sets the modifier bits

Specified by:
setModifiers in interface ModifierHolder
Parameters:
modifiers - the modifier bits

isAbstract

public boolean isAbstract()
Determine if the node is abstract

Specified by:
isAbstract in interface ModifierHolder
Returns:
true if this stores an ABSTRACT flag

isExplicit

public boolean isExplicit()
Determine if the node is explicit

Specified by:
isExplicit in interface ModifierHolder
Returns:
true if this stores an EXPLICIT flag

isFinal

public boolean isFinal()
Determine if the node is final

Specified by:
isFinal in interface ModifierHolder
Returns:
true if this stores an FINAL flag

isInterface

public boolean isInterface()
Determine if the node is interface

Specified by:
isInterface in interface ModifierHolder
Returns:
true if this stores an INTERFACE flag

isNative

public boolean isNative()
Determine if the node is native

Specified by:
isNative in interface ModifierHolder
Returns:
true if this stores an NATIVE flag

isPrivate

public boolean isPrivate()
Determine if the node is private

Specified by:
isPrivate in interface ModifierHolder
Returns:
true if this stores an PRIVATE flag

isProtected

public boolean isProtected()
Determine if the node is protected

Specified by:
isProtected in interface ModifierHolder
Returns:
true if this stores an PROTECTED flag

isPublic

public boolean isPublic()
Determine if the node is public

Specified by:
isPublic in interface ModifierHolder
Returns:
true if this stores an PUBLIC flag

isStatic

public boolean isStatic()
Determine if the node is static

Specified by:
isStatic in interface ModifierHolder
Returns:
true if this stores an static flag

isStrictFP

public boolean isStrictFP()
Determine if the node is strictFP

Specified by:
isStrictFP in interface ModifierHolder
Returns:
true if this stores an STRICTFP flag

isSynchronized

public boolean isSynchronized()
Determine if the node is synchronized

Specified by:
isSynchronized in interface ModifierHolder
Returns:
true if this stores an SYNCHRONIZED flag

isTransient

public boolean isTransient()
Determine if the node is transient

Specified by:
isTransient in interface ModifierHolder
Returns:
true if this stores an TRANSIENT flag

isVolatile

public boolean isVolatile()
Determine if the node is volatile

Specified by:
isVolatile in interface ModifierHolder
Returns:
true if this stores an VOLATILE flag

isPackage

public boolean isPackage()
Determines if this has package scope

Specified by:
isPackage in interface ModifierHolder
Returns:
true if this has package scope

getModifiers

public int getModifiers()
Gets the modifier bits

Specified by:
getModifiers in interface ModifierHolder
Returns:
the modifier bits

copyModifiers

public void copyModifiers(ModifierHolder source)
Copies the modifiers from another source

Specified by:
copyModifiers in interface ModifierHolder
Parameters:
source - the source

addModifier

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

Specified by:
addModifier in interface ModifierHolder
Parameters:
mod - the new modifier

setCode

protected void setCode(boolean value,
                       int code)
Sets or resets a single bit in the modifiers

Parameters:
value - true if we are setting the bit
code - The new Code value