com.go.trove.classfile
Class AccessFlags

java.lang.Object
  |
  +--java.lang.reflect.Modifier
        |
        +--com.go.trove.classfile.AccessFlags
All Implemented Interfaces:
java.lang.Cloneable

public class AccessFlags
extends java.lang.reflect.Modifier
implements java.lang.Cloneable

The AccessFlags class is a wrapper around a Modifier bit mask. The methods provided to manipulate the Modifier ensure that it is always legal. i.e. setting it public automatically clears it from being private or protected.

Version:
18 , 9/07/00
Author:
Brian S O'Neill

Fields inherited from class java.lang.reflect.Modifier
ABSTRACT, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, TRANSIENT, VOLATILE
 
Constructor Summary
AccessFlags()
          Construct with a modifier of 0.
AccessFlags(int modifier)
           
 
Method Summary
 java.lang.Object clone()
           
 int getModifier()
           
 boolean isAbstract()
           
 boolean isFinal()
           
 boolean isInterface()
           
 boolean isNative()
           
 boolean isPrivate()
           
 boolean isProtected()
           
 boolean isPublic()
           
 boolean isStatic()
           
 boolean isSynchronized()
           
 boolean isTransient()
           
 boolean isVolatile()
           
 void setAbstract(boolean value)
          When set abstract, it is cleared from being final.
 void setFinal(boolean value)
          When set final, it is cleared from being an interface or abstract.
 void setInterface(boolean value)
          When set as an interface, it is cleared from being final and set as being abstract.
 void setModifier(int flags)
           
 void setNative(boolean value)
           
 void setPrivate(boolean value)
          When set private, it is cleared from being public or protected.
 void setProtected(boolean value)
          When set protected, it is cleared from being public or private.
 void setPublic(boolean value)
          When set public, it is cleared from being private or protected.
 void setStatic(boolean value)
           
 void setSynchronized(boolean value)
           
 void setTransient(boolean value)
           
 void setVolatile(boolean value)
           
 java.lang.String toString()
          Returns the string value generated by the Modifier class.
 
Methods inherited from class java.lang.reflect.Modifier
isAbstract, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVolatile, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccessFlags

public AccessFlags()
Construct with a modifier of 0.

AccessFlags

public AccessFlags(int modifier)
Method Detail

getModifier

public final int getModifier()

setModifier

public void setModifier(int flags)

isPublic

public boolean isPublic()

setPublic

public void setPublic(boolean value)
When set public, it is cleared from being private or protected.

isPrivate

public boolean isPrivate()

setPrivate

public void setPrivate(boolean value)
When set private, it is cleared from being public or protected.

isProtected

public boolean isProtected()

setProtected

public void setProtected(boolean value)
When set protected, it is cleared from being public or private.

isStatic

public boolean isStatic()

setStatic

public void setStatic(boolean value)

isFinal

public boolean isFinal()

setFinal

public void setFinal(boolean value)
When set final, it is cleared from being an interface or abstract.

isSynchronized

public boolean isSynchronized()

setSynchronized

public void setSynchronized(boolean value)

isVolatile

public boolean isVolatile()

setVolatile

public void setVolatile(boolean value)

isTransient

public boolean isTransient()

setTransient

public void setTransient(boolean value)

isNative

public boolean isNative()

setNative

public void setNative(boolean value)

isInterface

public boolean isInterface()

setInterface

public void setInterface(boolean value)
When set as an interface, it is cleared from being final and set as being abstract.

isAbstract

public boolean isAbstract()

setAbstract

public void setAbstract(boolean value)
When set abstract, it is cleared from being final. When cleared from being abstract, it is also cleared from being an interface.

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Returns the string value generated by the Modifier class.
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()