org.aspectj.compiler.crosscuts.ast
Class AdviceDec
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
org.aspectj.compiler.base.ast.CodeDec
org.aspectj.compiler.crosscuts.ast.AdviceDec
- All Implemented Interfaces:
- AspectMember, org.aspectj.compiler.crosscuts.joinpoints.JpPlannerMaker, PossibleSoftThrowable
- Direct Known Subclasses:
- AfterAdviceDec, AfterReturningAdviceDec, AfterThrowingAdviceDec, AroundAdviceDec, BeforeAdviceDec
- public abstract class AdviceDec
- extends CodeDec
- implements org.aspectj.compiler.crosscuts.joinpoints.JpPlannerMaker, AspectMember
Methods inherited from class org.aspectj.compiler.base.ast.CodeDec |
addThrows, addThrowsType, appearsStaticToCaller, blockToBody, canThrow, cgCodeMember, cgMember, cleanup, computeMinimalThrows, conflictsWith, getBody, getCallExprs, getDescriptor, getEffectivelyFinalFormals, getFormals, getFrameSize, getModifiers, getPossibleCheckedExceptions, getResultType, getStackDelta, getThrows, hasThis, isAlmostApplicable, isApplicable, isMoreSpecificThan, isSoftThrowable, postCleanup, postScope, setBody, setBody, setFormals, setFrameSize, setModifiers, setSoftThrowable, setThrows, walkAnalysis, walkCleanup, walkFlow, walkFrameLoc, walkInnerInfo |
Methods inherited from class org.aspectj.compiler.base.ast.Dec |
addIntroducedFromType, checkOverride, dominates, forcePublic, getBytecodeId, getCorrespondingSemanticObject, getDeclaringType, getLexicalType, getName, getOutermostLexicalType, getSignatureString, inStaticContext, isAbstract, isAccessible, isAccessible, isDeprecated, isFinal, isInherited, isIntroduced, isLanguageVisible, isMoreAccessibleThan, isPrivate, isProtected, isPublic, isStatic, isSynthetic, lookupDeclaringType, lookupLexicalType, makeBlockScope, makeCorrespondingSemanticObject, postCopy, preCopy, preMove, requireStmt, samePackage, setAllEnclosingTypes, setBytecodeId, setDeclaringType, setDeprecated, setExplicitlyNonSynthetic, setFromLexicalScope, setId, setLanguageVisible, setLexicalType, walkForwardReference, writeModifiers, writeNames |
Methods inherited from class org.aspectj.compiler.base.ast.ASTObject |
addComment, buildAccessMethod, checkNoSharing, clearComment, clearParent, contains, containsTypes, copy, copyWalk, display, fixAccessPost, fixAST, fromSource, getAST, getBeginColumn, getBeginLine, getBytecodeType, getBytecodeTypeDec, getComment, getCompilationUnit, getEnclosingCodeDec, getEnclosingDec, getEndColumn, getEndLine, getEndPosition, getFormalComment, getOutermostBytecodeType, getParent, getSourceDirectoryName, getSourceFile, getSourceFileName, getSourceLocation, getStartPosition, hasLegalProtectedAccess, hasSource, hasSourceLocation, implementMixin, indexOf, isLeaf, makeChild, makeChild, postAssignmentCheck, postImplementMixin, postInnerAccess, postInnerInfo, postLift, postMove, postThreading, preAssignmentCheck, preIntroduction, preLift, preThreading, remove, remove, removeChildAt, replaceWith, setFormalComment, setParent, setParents, setSource, setSourceLocation, setSyntheticSource, showError, showMessage, showTypeError, showWarning, toString, unparse, walk, walkAssignmentCheck, 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 |
thisDynamicJoinPointFormal
protected FormalDec thisDynamicJoinPointFormal
thisStaticJoinPointFormal
protected FormalDec thisStaticJoinPointFormal
thisStaticEnclosingJoinPointFormal
protected FormalDec thisStaticEnclosingJoinPointFormal
pcd
protected Pcd pcd
AdviceDec
public AdviceDec(SourceLocation location,
Modifiers _modifiers,
Formals _formals,
TypeDs __throws,
Pcd _pcd,
CodeBody _body)
AdviceDec
protected AdviceDec(SourceLocation source)
getKind
public java.lang.String getKind()
- Specified by:
getKind
in class Dec
getAspectDec
public AspectDec getAspectDec()
getExtraFormal
public FormalDec getExtraFormal()
- returns the after returning or after throwing formal.
Overridden in
AfterReturningAdviceDec
and AfterThrowingAdviceDec
and AroundAdviceDec
.
isAfterAdvice
protected boolean isAfterAdvice()
reverseSortOrder
protected boolean reverseSortOrder(AdviceDec a1,
AdviceDec a2)
dominates
public boolean dominates(AdviceDec otherAdvice)
makePlanner
public org.aspectj.compiler.crosscuts.joinpoints.JpPlanner makePlanner(PlanData planData)
- Specified by:
makePlanner
in interface org.aspectj.compiler.crosscuts.joinpoints.JpPlannerMaker
wrapJoinPoint
public void wrapJoinPoint(org.aspectj.compiler.crosscuts.joinpoints.JoinPoint joinPoint,
org.aspectj.compiler.crosscuts.joinpoints.AdvicePlan plan)
wrapStmts
protected Stmts wrapStmts(Stmts stmts,
org.aspectj.compiler.crosscuts.joinpoints.AdvicePlan plan)
makeFormals
protected final Formals makeFormals()
getExtraArgType
public final Type getExtraArgType()
makeConcreteMethod
public MethodDec makeConcreteMethod()
makeMethodBody
protected CodeBody makeMethodBody()
- returns the method body used for the java method corresponding to
this advice
this method body is my actual body in the AST, never a copy
finishMethodDec
protected void finishMethodDec(MethodDec methodDec)
getMethodDec
public MethodDec getMethodDec()
makeCall
public Expr makeCall(Expr parent,
Exprs baseExprs)
needsStaticEnclosingJoinPointFormal
public boolean needsStaticEnclosingJoinPointFormal()
needsStaticJoinPointFormal
public boolean needsStaticJoinPointFormal()
needsDynamicJoinPointFormal
public boolean needsDynamicJoinPointFormal()
needsCallSiteContext
public boolean needsCallSiteContext()
addJoinPointFormals
public void addJoinPointFormals(Formals formals)
makeJoinPointFormal
protected FormalDec makeJoinPointFormal(java.lang.String name)
makeJoinPointStaticPartFormal
protected FormalDec makeJoinPointStaticPartFormal(java.lang.String name)
setupFlowWalker
protected void setupFlowWalker(org.aspectj.compiler.base.FlowCheckerPass w)
- Description copied from class:
CodeDec
- set up the flow walker, by adding implicit variables like
thisJoinPoint, etc
- Overrides:
setupFlowWalker
in class CodeDec
postFixAST
public ASTObject postFixAST(org.aspectj.compiler.base.ASTFixerPass fixer)
- Replace the advice with its corresponding MethodDec in the AspectDec
- Overrides:
postFixAST
in class ASTObject
makeBodyScope
protected org.aspectj.compiler.base.cst.BlockScope makeBodyScope(org.aspectj.compiler.base.cst.Scope parent)
preScope
public void preScope(ScopeWalker walker)
- Overrides:
preScope
in class CodeDec
checkSpec
public void checkSpec()
- Overrides:
checkSpec
in class CodeDec
getId
public java.lang.String getId()
- Specified by:
getId
in class CodeDec
getResultTypeD
public TypeD getResultTypeD()
- Specified by:
getResultTypeD
in class CodeDec
getReturnType
public Type getReturnType()
toShortString
public java.lang.String toShortString()
- Specified by:
toShortString
in interface org.aspectj.compiler.crosscuts.joinpoints.JpPlannerMaker
- Specified by:
toShortString
in class Dec
getAdviceKind
protected abstract java.lang.String getAdviceKind()
unparse
public void unparse(org.aspectj.compiler.base.CodeWriter writer)
- Specified by:
unparse
in interface AspectMember
- Overrides:
unparse
in class ASTObject
getPcd
public Pcd getPcd()
setPcd
public void setPcd(Pcd _pcd)
getChildAt
public ASTObject getChildAt(int childIndex)
- Overrides:
getChildAt
in class CodeDec
getChildNameAt
public java.lang.String getChildNameAt(int childIndex)
- Overrides:
getChildNameAt
in class CodeDec
setChildAt
public void setChildAt(int childIndex,
ASTObject child)
- Overrides:
setChildAt
in class CodeDec
getChildCount
public int getChildCount()
- Overrides:
getChildCount
in class CodeDec
getDefaultDisplayName
public java.lang.String getDefaultDisplayName()
- Overrides:
getDefaultDisplayName
in class CodeDec