org.aspectj.compiler.base.ast
Class Dec

java.lang.Object
  extended byorg.aspectj.compiler.base.CompilerObject
      extended byorg.aspectj.compiler.base.ast.ASTObject
          extended byorg.aspectj.compiler.base.ast.Stmt
              extended byorg.aspectj.compiler.base.ast.Dec
Direct Known Subclasses:
CodeDec, DeclareDec, IntroducedDec, IntroducedSuperDec, PointcutDec, ShowErrorDec, SoftThrowableDec, TypeDec, VarDec

public abstract class Dec
extends Stmt


Field Summary
 boolean forcePublic
           
 Dec owner
           
protected  SemanticObject semanticObject
           
 
Fields inherited from class org.aspectj.compiler.base.ast.ASTObject
dummySource, parent, sourceLocation
 
Constructor Summary
Dec(SourceLocation location)
           
 
Method Summary
protected  java.lang.String addIntroducedFromType(java.lang.String s)
           
protected  void cgMember(org.aspectj.compiler.base.bcg.ClassfileBuilder maker)
          This method takes care of generating code for Member decs.
 boolean checkOverride(Type inType, Dec otherDec)
           
 void cleanup()
           
 boolean conflictsWith(Dec otherDec)
           
 boolean dominates(Dec otherDec)
           
 void forcePublic()
           
 java.lang.String getBytecodeId()
           
 SemanticObject getCorrespondingSemanticObject()
           
 Type getDeclaringType()
          returns the declaring type of a method.
 java.lang.String getDefaultDisplayName()
           
 java.lang.String getDescriptor()
           
abstract  java.lang.String getId()
           
abstract  java.lang.String getKind()
           
 Type getLexicalType()
          returns the lexically enclosing Type for this object.
abstract  Modifiers getModifiers()
           
 java.lang.String getName()
           
 Type getOutermostLexicalType()
           
 java.lang.String getSignatureString()
           
 int getStackDelta()
           
 boolean inStaticContext()
           
 boolean isAbstract()
           
 boolean isAccessible(ASTObject fromWhere)
           
 boolean isAccessible(ASTObject fromWhere, boolean inBytecode)
           
 boolean isAlmostApplicable(Exprs params)
           
 boolean isApplicable(Exprs parameters)
           
 boolean isDeprecated()
           
 boolean isFinal()
           
 boolean isInherited(Type inType)
           
 boolean isIntroduced()
           
 boolean isLanguageVisible()
           
 boolean isMoreAccessibleThan(Dec other)
           
 boolean isMoreSpecificThan(Dec other)
           
 boolean isPrivate()
           
 boolean isProtected()
           
 boolean isPublic()
           
 boolean isStatic()
           
 boolean isSynthetic()
           
protected  Type lookupDeclaringType()
           
protected  Type lookupLexicalType()
           
protected  org.aspectj.compiler.base.cst.BlockScope makeBlockScope(ScopeWalker walker)
           
 SemanticObject makeCorrespondingSemanticObject()
           
 ASTObject postCopy(CopyWalker walker, ASTObject oldObject)
           
 void preCopy(CopyWalker walker, ASTObject oldObject)
           
 void preMove(MovingWalker walker)
           
 void requireStmt()
           
 boolean samePackage(Type fromType, Type thisType, ASTObject fromWhere)
           
 void setAllEnclosingTypes(Type type)
           
 void setBytecodeId(java.lang.String id)
           
 void setDeclaringType(Type type)
           
 void setDeprecated(boolean isDeprecated)
           
 void setExplicitlyNonSynthetic()
           
 void setFromLexicalScope(org.aspectj.compiler.base.cst.Scope fromScope)
           
 void setId(java.lang.String id)
           
 void setLanguageVisible()
           
 void setLexicalType(Type type)
           
abstract  java.lang.String toShortString()
           
 void walkForwardReference(org.aspectj.compiler.base.ForwardReferenceChecker w)
           
 void writeModifiers(org.aspectj.compiler.base.CodeWriter writer)
           
 void writeNames(org.aspectj.compiler.base.CodeWriter writer, java.lang.String label, TypeDs names)
           
 
Methods inherited from class org.aspectj.compiler.base.ast.Stmt
cgStmt, cgTop, completesNormally, isBreakable, isContinuable, isEmpty, mustBeLive, registerLocation, requireBlockStmt, setCompletesNormally
 
Methods inherited from class org.aspectj.compiler.base.ast.ASTObject
addComment, buildAccessMethod, checkNoSharing, checkSpec, clearComment, clearParent, contains, containsTypes, copy, copyWalk, display, fixAccessPost, fixAST, fromSource, getAST, getBeginColumn, getBeginLine, getBytecodeType, getBytecodeTypeDec, getChildAt, getChildCount, getChildNameAt, getComment, getCompilationUnit, getEnclosingCodeDec, getEnclosingDec, getEndColumn, getEndLine, getEndPosition, getFormalComment, getOutermostBytecodeType, getParent, getSourceDirectoryName, getSourceFile, getSourceFileName, getSourceLocation, getStartPosition, hasLegalProtectedAccess, hasSource, hasSourceLocation, implementMixin, indexOf, isLeaf, makeChild, makeChild, postAssignmentCheck, postCleanup, postFixAST, postImplementMixin, postInnerAccess, postInnerInfo, postLift, postMove, postScope, postThreading, preAssignmentCheck, preIntroduction, preLift, preScope, preThreading, remove, remove, removeChildAt, replaceWith, setChildAt, setFormalComment, setParent, setParents, setSource, setSourceLocation, setSyntheticSource, showError, showMessage, showTypeError, showWarning, toString, unparse, unparse, walk, walkAnalysis, walkAssignmentCheck, walkCleanup, walkFlow, 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

semanticObject

protected SemanticObject semanticObject

owner

public Dec owner

forcePublic

public boolean forcePublic
Constructor Detail

Dec

public Dec(SourceLocation location)
Method Detail

getCorrespondingSemanticObject

public SemanticObject getCorrespondingSemanticObject()

makeCorrespondingSemanticObject

public SemanticObject makeCorrespondingSemanticObject()

makeBlockScope

protected final org.aspectj.compiler.base.cst.BlockScope makeBlockScope(ScopeWalker walker)

requireStmt

public void requireStmt()
Overrides:
requireStmt in class Stmt

isDeprecated

public boolean isDeprecated()

setDeprecated

public void setDeprecated(boolean isDeprecated)

inStaticContext

public boolean inStaticContext()
Overrides:
inStaticContext in class ASTObject

isLanguageVisible

public boolean isLanguageVisible()
Overrides:
isLanguageVisible in class ASTObject

setLanguageVisible

public void setLanguageVisible()

isSynthetic

public boolean isSynthetic()
Overrides:
isSynthetic in class ASTObject

setExplicitlyNonSynthetic

public void setExplicitlyNonSynthetic()

addIntroducedFromType

protected java.lang.String addIntroducedFromType(java.lang.String s)

isIntroduced

public boolean isIntroduced()

setFromLexicalScope

public void setFromLexicalScope(org.aspectj.compiler.base.cst.Scope fromScope)

setAllEnclosingTypes

public void setAllEnclosingTypes(Type type)

setDeclaringType

public void setDeclaringType(Type type)

getDeclaringType

public Type getDeclaringType()
Description copied from class: ASTObject
returns the declaring type of a method. For non-static methods, this type will always be the type of 'this' within the method. For static methods, this type will always be the type used to name the method for outside of its scope, i.e. DeclaringType.m() For a comparision with getLexicalType() and getBytecodeTypeDec() see getLexicalType().

Overrides:
getDeclaringType in class ASTObject

setLexicalType

public void setLexicalType(Type type)

getLexicalType

public Type getLexicalType()
Description copied from class: ASTObject
returns the lexically enclosing Type for this object. For pure Java code this is always identical to getDeclaringType() and getBytecodeTypeDec().getType(). For introduced methods, this can be different, i.e. interface I { } class C implements I { } aspect A { void C.m() { ... } } For the method I.m() implemented in C and for any ASTObjects inside of it, getLexicalType() == A getDeclaringType() == I getBytecodeTypeDec().getType() == C

Overrides:
getLexicalType in class ASTObject

getOutermostLexicalType

public Type getOutermostLexicalType()
Overrides:
getOutermostLexicalType in class ASTObject

lookupDeclaringType

protected Type lookupDeclaringType()

lookupLexicalType

protected Type lookupLexicalType()

walkForwardReference

public void walkForwardReference(org.aspectj.compiler.base.ForwardReferenceChecker w)
Overrides:
walkForwardReference in class ASTObject

postCopy

public ASTObject postCopy(CopyWalker walker,
                          ASTObject oldObject)
Overrides:
postCopy in class ASTObject

preCopy

public void preCopy(CopyWalker walker,
                    ASTObject oldObject)
Overrides:
preCopy in class ASTObject

preMove

public void preMove(MovingWalker walker)
Overrides:
preMove in class ASTObject

isPublic

public boolean isPublic()

isFinal

public boolean isFinal()

isPrivate

public boolean isPrivate()

isProtected

public boolean isProtected()

isStatic

public boolean isStatic()

isAbstract

public boolean isAbstract()

getModifiers

public abstract Modifiers getModifiers()

forcePublic

public void forcePublic()

isMoreAccessibleThan

public boolean isMoreAccessibleThan(Dec other)

isMoreSpecificThan

public boolean isMoreSpecificThan(Dec other)

isApplicable

public boolean isApplicable(Exprs parameters)

isAlmostApplicable

public boolean isAlmostApplicable(Exprs params)

isAccessible

public boolean isAccessible(ASTObject fromWhere)

isAccessible

public boolean isAccessible(ASTObject fromWhere,
                            boolean inBytecode)

samePackage

public boolean samePackage(Type fromType,
                           Type thisType,
                           ASTObject fromWhere)

isInherited

public boolean isInherited(Type inType)

conflictsWith

public boolean conflictsWith(Dec otherDec)

checkOverride

public boolean checkOverride(Type inType,
                             Dec otherDec)

dominates

public boolean dominates(Dec otherDec)

getSignatureString

public java.lang.String getSignatureString()

getKind

public abstract java.lang.String getKind()

getBytecodeId

public java.lang.String getBytecodeId()

setBytecodeId

public void setBytecodeId(java.lang.String id)

setId

public void setId(java.lang.String id)

getName

public java.lang.String getName()

getId

public abstract java.lang.String getId()

toShortString

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

writeNames

public void writeNames(org.aspectj.compiler.base.CodeWriter writer,
                       java.lang.String label,
                       TypeDs names)

writeModifiers

public void writeModifiers(org.aspectj.compiler.base.CodeWriter writer)

cleanup

public void cleanup()
Overrides:
cleanup in class ASTObject

getDescriptor

public java.lang.String getDescriptor()

getStackDelta

public int getStackDelta()

cgMember

protected void cgMember(org.aspectj.compiler.base.bcg.ClassfileBuilder maker)
This method takes care of generating code for Member decs. At this point in the compilation, we should only have two kinds of Member decs, FieldDec and CodeDec. Moreover, FieldDecs should not have initializers unless they're constants. This method throws an error if it is ever invoked: FieldDec and CodeDec override it.


getDefaultDisplayName

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