org.aspectj.compiler.base.ast
Class Modifiers

java.lang.Object
  extended byorg.aspectj.compiler.base.CompilerObject
      extended byorg.aspectj.compiler.base.ast.ASTObject
          extended byorg.aspectj.compiler.base.ast.Modifiers
Direct Known Subclasses:
MajParameterModifiers, ModifiersPattern

public class Modifiers
extends ASTObject


Field Summary
static int ABSTRACT
          The int value representing the abstract modifier.
static int CONSTRUCTOR_PRINT_MASK
          Print mask for constructor modifiers - avoid strictfp
static int DEFAULT_PRINT_MASK
          Default print mask
static int FINAL
          The int value representing the final modifier.
static int INTERFACE
          The int value representing the interface modifier.
static int INTERFACE_METHOD_PRINT_MASK
          Print mask for interface modifiers - avoid public+abstract+strictfp
static int NATIVE
          The int value representing the native modifier.
static int PRIVATE
          The int value representing the private modifier.
static int PRIVILEGED
           
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 STRICT
          The int value representing the strictfp modifier.
static int SYNCHRONIZED
          The int value representing the synchronized modifier.
static int THREADSAFE
           
static int TRANSIENT
          The int value representing the transient modifier.
protected  int value
           
static int VOLATILE
          The int value representing the volatile modifier.
 
Fields inherited from class org.aspectj.compiler.base.ast.ASTObject
dummySource, parent, sourceLocation
 
Constructor Summary
  Modifiers(int _value)
           
  Modifiers(int _v1, int _v2)
           
  Modifiers(int _value, Modifiers _mod1)
           
  Modifiers(Modifiers _mod1, int _v)
           
  Modifiers(Modifiers _mod1, Modifiers _mod2)
           
protected Modifiers(SourceLocation source)
           
  Modifiers(SourceLocation location, int _value)
           
 
Method Summary
 void checkIllegalCombination(int c1, int c2)
           
 void checkSpec()
           
 ASTObject copyWalk(CopyWalker walker)
           
 int getAcceptableClassValue()
          Returns an integer that is acceptable to store as a classfile's access flags.
 int getAcceptableInnerClassValue()
          Returns an integer that is acceptable to store in the InnerClass attribute of a classfile.
 int getAccessValue()
          Returns an integer that only encapsulates the access modifiers.
 java.lang.String getAccessValueString()
           
 java.lang.String getDefaultDisplayName()
           
 int getFalseValue()
           
 int getValue()
           
 boolean isAbstract()
           
static boolean isAbstract(int value)
           
 boolean isFinal()
           
static boolean isFinal(int value)
           
 boolean isInterface()
           
static boolean isInterface(int value)
           
 boolean isMoreAccessibleThan(Modifiers other)
           
 boolean isNative()
           
 boolean isPackagePrivate()
           
static boolean isPackagePrivate(int value)
           
 boolean isPrivate()
           
static boolean isPrivate(int value)
           
 boolean isPrivileged()
           
static boolean isPrivileged(int value)
           
 boolean isProtected()
           
static boolean isProtected(int value)
           
 boolean isPublic()
           
static boolean isPublic(int value)
           
 boolean isStatic()
           
static boolean isStatic(int value)
           
 boolean isStrict()
           
static boolean isStrict(int value)
           
 boolean isSynchronized()
           
 boolean isTransient()
           
 boolean isVolatile()
           
 boolean isWeakerThan(Modifiers other)
           
 boolean matches(Modifiers otherModifiers)
           
 void setAbstract(boolean v)
           
protected  void setAttribute(int mask, boolean set)
           
 void setFinal(boolean v)
           
 void setInterface(boolean v)
           
 void setPrivate(boolean v)
           
 void setProtected()
           
 void setPublic(boolean v)
           
 void setStatic(boolean v)
           
 void setStrict(boolean v)
           
 void setSynchronized(boolean v)
           
 void setValue(int _value)
           
 java.lang.String toShortString()
           
 java.lang.String toString()
           
 void unparse(org.aspectj.compiler.base.CodeWriter writer)
           
 
Methods inherited from class org.aspectj.compiler.base.ast.ASTObject
addComment, buildAccessMethod, checkNoSharing, cleanup, clearComment, clearParent, contains, containsTypes, copy, display, fixAccessPost, fixAST, fromSource, getAST, getBeginColumn, getBeginLine, getBytecodeType, getBytecodeTypeDec, getChildAt, getChildCount, getChildNameAt, getComment, getCompilationUnit, getDeclaringType, getEnclosingCodeDec, getEnclosingDec, getEndColumn, getEndLine, getEndPosition, getFormalComment, getLexicalType, getOutermostBytecodeType, getOutermostLexicalType, getParent, getSourceDirectoryName, getSourceFile, getSourceFileName, getSourceLocation, getStartPosition, hasLegalProtectedAccess, hasSource, hasSourceLocation, implementMixin, indexOf, inStaticContext, isLanguageVisible, isLeaf, isSynthetic, makeChild, makeChild, postAssignmentCheck, postCleanup, postCopy, postFixAST, postImplementMixin, postInnerAccess, postInnerInfo, postLift, postMove, postScope, postThreading, preAssignmentCheck, preCopy, preIntroduction, preLift, preMove, preScope, preThreading, remove, remove, removeChildAt, replaceWith, setChildAt, setFormalComment, setParent, setParents, setSource, setSourceLocation, setSyntheticSource, showError, showMessage, showTypeError, showWarning, unparse, walk, walkAnalysis, walkAssignmentCheck, walkCleanup, walkFlow, walkForwardReference, walkFrameLoc, walkInnerInfo, walkMemberMunger, walkScope
 
Methods inherited from class org.aspectj.compiler.base.CompilerObject
getCompiler, getOptions, getTypeManager, getWorld
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PUBLIC

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

See Also:
Constant Field Values

PRIVATE

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

See Also:
Constant Field Values

PROTECTED

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

See Also:
Constant Field Values

STATIC

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

See Also:
Constant Field Values

FINAL

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

See Also:
Constant Field Values

SYNCHRONIZED

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

See Also:
Constant Field Values

VOLATILE

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

See Also:
Constant Field Values

TRANSIENT

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

See Also:
Constant Field Values

NATIVE

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

See Also:
Constant Field Values

INTERFACE

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

See Also:
Constant Field Values

ABSTRACT

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

See Also:
Constant Field Values

STRICT

public static final int STRICT
The int value representing the strictfp modifier.

See Also:
Constant Field Values

PRIVILEGED

public static final int PRIVILEGED
See Also:
Constant Field Values

THREADSAFE

public static final int THREADSAFE
See Also:
Constant Field Values

DEFAULT_PRINT_MASK

public static final int DEFAULT_PRINT_MASK
Default print mask

See Also:
Constant Field Values

INTERFACE_METHOD_PRINT_MASK

public static final int INTERFACE_METHOD_PRINT_MASK
Print mask for interface modifiers - avoid public+abstract+strictfp

See Also:
Constant Field Values

CONSTRUCTOR_PRINT_MASK

public static final int CONSTRUCTOR_PRINT_MASK
Print mask for constructor modifiers - avoid strictfp

See Also:
Constant Field Values

value

protected int value
Constructor Detail

Modifiers

public Modifiers(SourceLocation location,
                 int _value)

Modifiers

public Modifiers(int _value)

Modifiers

public Modifiers(int _v1,
                 int _v2)

Modifiers

public Modifiers(Modifiers _mod1,
                 Modifiers _mod2)

Modifiers

public Modifiers(Modifiers _mod1,
                 int _v)

Modifiers

public Modifiers(int _value,
                 Modifiers _mod1)

Modifiers

protected Modifiers(SourceLocation source)
Method Detail

isPublic

public static boolean isPublic(int value)

isPublic

public boolean isPublic()

isFinal

public static boolean isFinal(int value)

isFinal

public boolean isFinal()

isPrivate

public static boolean isPrivate(int value)

isPrivate

public boolean isPrivate()

isProtected

public static boolean isProtected(int value)

isProtected

public boolean isProtected()

isPackagePrivate

public static boolean isPackagePrivate(int value)

isPackagePrivate

public boolean isPackagePrivate()

isInterface

public static boolean isInterface(int value)

isInterface

public boolean isInterface()

isStatic

public static boolean isStatic(int value)

isStatic

public boolean isStatic()

isAbstract

public static boolean isAbstract(int value)

isAbstract

public boolean isAbstract()

isStrict

public static boolean isStrict(int value)

isStrict

public boolean isStrict()

isPrivileged

public static boolean isPrivileged(int value)

isPrivileged

public boolean isPrivileged()

isSynchronized

public boolean isSynchronized()

isNative

public boolean isNative()

isTransient

public boolean isTransient()

isVolatile

public boolean isVolatile()

setAttribute

protected void setAttribute(int mask,
                            boolean set)

setPublic

public void setPublic(boolean v)

setProtected

public void setProtected()

setPrivate

public void setPrivate(boolean v)

setInterface

public void setInterface(boolean v)

setFinal

public void setFinal(boolean v)

setAbstract

public void setAbstract(boolean v)

setStatic

public void setStatic(boolean v)

setStrict

public void setStrict(boolean v)

setSynchronized

public void setSynchronized(boolean v)

isWeakerThan

public boolean isWeakerThan(Modifiers other)

isMoreAccessibleThan

public boolean isMoreAccessibleThan(Modifiers other)

getFalseValue

public int getFalseValue()

getAcceptableClassValue

public int getAcceptableClassValue()
Returns an integer that is acceptable to store as a classfile's access flags. Only modifiers of TypeDecs will go through this. This strips out any value disallowed by the JVM spec, and turns protected modifiers (which may occur on inner classes) public.


getAcceptableInnerClassValue

public int getAcceptableInnerClassValue()
Returns an integer that is acceptable to store in the InnerClass attribute of a classfile. Only modifiers of TypeDecs will go through this. This strips out any value disallowed by the JVM.


getAccessValue

public int getAccessValue()
Returns an integer that only encapsulates the access modifiers. That is, only PUBLIC, PRIVATE, or PROTECTED.


getAccessValueString

public java.lang.String getAccessValueString()

checkIllegalCombination

public void checkIllegalCombination(int c1,
                                    int c2)

checkSpec

public void checkSpec()
Overrides:
checkSpec in class ASTObject

matches

public boolean matches(Modifiers otherModifiers)

toShortString

public java.lang.String toShortString()
Overrides:
toShortString in class ASTObject

unparse

public void unparse(org.aspectj.compiler.base.CodeWriter writer)
             throws java.io.IOException
Overrides:
unparse in class ASTObject
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class ASTObject

getValue

public int getValue()

setValue

public void setValue(int _value)

copyWalk

public ASTObject copyWalk(CopyWalker walker)
Overrides:
copyWalk in class ASTObject

getDefaultDisplayName

public java.lang.String getDefaultDisplayName()
Overrides:
getDefaultDisplayName in class ASTObject