org.aspectj.compiler.base.ast
Class Dec
java.lang.Object
org.aspectj.compiler.base.CompilerObject
org.aspectj.compiler.base.ast.ASTObject
org.aspectj.compiler.base.ast.Stmt
org.aspectj.compiler.base.ast.Dec
- Direct Known Subclasses:
- CodeDec, DeclareDec, IntroducedDec, IntroducedSuperDec, PointcutDec, ShowErrorDec, SoftThrowableDec, TypeDec, VarDec
- public abstract class Dec
- extends Stmt
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 |
semanticObject
protected SemanticObject semanticObject
owner
public Dec owner
forcePublic
public boolean forcePublic
Dec
public Dec(SourceLocation location)
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, FieldDec
s 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