org.aspectj.compiler.base.ast
Class MethodDec

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
                  extended byorg.aspectj.compiler.base.ast.CodeDec
                      extended byorg.aspectj.compiler.base.ast.MethodDec
All Implemented Interfaces:
AspectMember, ClassMember, PossibleSoftThrowable

public class MethodDec
extends CodeDec
implements AspectMember, ClassMember


Field Summary
protected  java.lang.String id
           
protected  TypeD resultTypeD
           
 
Fields inherited from class org.aspectj.compiler.base.ast.CodeDec
_throws, body, formals, modifiers
 
Fields inherited from class org.aspectj.compiler.base.ast.Dec
forcePublic, owner, semanticObject
 
Fields inherited from class org.aspectj.compiler.base.ast.ASTObject
dummySource, parent, sourceLocation
 
Constructor Summary
  MethodDec(Modifiers modifiers, MethodDec methdec)
           
  MethodDec(Modifiers modifiers, TypeD resultTypeD, java.lang.String id, Formals formals, BlockStmt block)
           
  MethodDec(Modifiers modifiers, TypeD resultTypeD, java.lang.String id, Formals formals, TypeDs _throws, BlockStmt block)
           
protected MethodDec(SourceLocation source)
           
  MethodDec(SourceLocation source, Modifiers modifiers, TypeD resultTypeD, java.lang.String id, Formals formals, TypeDs _throws, BlockStmt block)
           
  MethodDec(SourceLocation location, Modifiers _modifiers, TypeD _resultTypeD, java.lang.String _id, Formals _formals, TypeDs __throws, CodeBody _body)
           
  MethodDec(SourceLocation source, Modifiers modifiers, Type resultType, java.lang.String id, Formals formals, TypeDs _throws, BlockStmt block)
           
 
Method Summary
protected  void cgCodeMember(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          generate code for the body.
 void cgTop(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          The purpose of this procedure is to dispatch to #cg, but to perform an invariant check beforehand to make sure the current stack size is zero.
 boolean checkOverride(Type inType, Dec otherDec)
           
 void checkSpec()
           
 ASTObject copyWalk(CopyWalker walker)
           
 MethodDec getBackdoorMethod()
           
 ASTObject getChildAt(int childIndex)
           
 int getChildCount()
           
 java.lang.String getChildNameAt(int childIndex)
           
 java.lang.String getDefaultDisplayName()
           
 java.lang.String getDescriptor()
          return the bytecode type descriptor for the member.
 Expr getExpr()
           
 java.lang.String getId()
           
 java.lang.String getKind()
           
 java.util.Set getMatchingMethods()
           
 java.util.Set getMatchingSignatureTypes()
           
 Method getMethod()
           
 TypeD getResultTypeD()
           
 int getStackDelta()
          return the change in stack that would result from invoking this codeDec.
 boolean isEffectivelyAbstract(Type inType)
           
 SemanticObject makeCorrespondingSemanticObject()
           
 boolean overrides(MethodDec other)
           
 ASTObject postFixAST(org.aspectj.compiler.base.ASTFixerPass fixer)
           
 ASTObject postImplementMixin(org.aspectj.compiler.crosscuts.MixinImplementationPass fixer)
           
 ASTObject postThreading(org.aspectj.compiler.base.LocalClassPass.ThreadingWalker walker)
           
 void preScope(ScopeWalker walker)
           
 void preThreading(org.aspectj.compiler.base.LocalClassPass.ThreadingWalker walker)
           
 void setChildAt(int childIndex, ASTObject child)
           
 void setId(java.lang.String _id)
           
 void setResultTypeD(TypeD _resultTypeD)
           
 java.lang.String toShortString()
           
 void unparse(org.aspectj.compiler.base.CodeWriter writer)
           
 
Methods inherited from class org.aspectj.compiler.base.ast.CodeDec
addThrows, addThrowsType, appearsStaticToCaller, blockToBody, canThrow, cgMember, cleanup, computeMinimalThrows, conflictsWith, getBody, getCallExprs, getEffectivelyFinalFormals, getFormals, getFrameSize, getModifiers, getPossibleCheckedExceptions, getResultType, getThrows, hasThis, isAlmostApplicable, isApplicable, isMoreSpecificThan, isSoftThrowable, postCleanup, postScope, setBody, setBody, setFormals, setFrameSize, setModifiers, setSoftThrowable, setThrows, setupFlowWalker, walkAnalysis, walkCleanup, walkFlow, walkFrameLoc, walkInnerInfo
 
Methods inherited from class org.aspectj.compiler.base.ast.Dec
addIntroducedFromType, 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, postCopy, preCopy, preMove, requireStmt, samePackage, setAllEnclosingTypes, setBytecodeId, setDeclaringType, setDeprecated, setExplicitlyNonSynthetic, setFromLexicalScope, setLanguageVisible, setLexicalType, walkForwardReference, writeModifiers, writeNames
 
Methods inherited from class org.aspectj.compiler.base.ast.Stmt
cgStmt, completesNormally, isBreakable, isContinuable, isEmpty, mustBeLive, registerLocation, requireBlockStmt, setCompletesNormally
 
Methods inherited from class org.aspectj.compiler.base.ast.ASTObject
addComment, buildAccessMethod, checkNoSharing, clearComment, clearParent, contains, containsTypes, copy, 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, postInnerAccess, postInnerInfo, postLift, postMove, preAssignmentCheck, preIntroduction, preLift, 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
 
Methods inherited from interface org.aspectj.compiler.crosscuts.ast.AspectMember
cleanup, setParent, unparse
 
Methods inherited from interface org.aspectj.compiler.base.ast.ClassMember
cleanup, setParent, unparse
 

Field Detail

resultTypeD

protected TypeD resultTypeD

id

protected java.lang.String id
Constructor Detail

MethodDec

public MethodDec(SourceLocation source,
                 Modifiers modifiers,
                 TypeD resultTypeD,
                 java.lang.String id,
                 Formals formals,
                 TypeDs _throws,
                 BlockStmt block)

MethodDec

public MethodDec(Modifiers modifiers,
                 TypeD resultTypeD,
                 java.lang.String id,
                 Formals formals,
                 TypeDs _throws,
                 BlockStmt block)

MethodDec

public MethodDec(Modifiers modifiers,
                 TypeD resultTypeD,
                 java.lang.String id,
                 Formals formals,
                 BlockStmt block)

MethodDec

public MethodDec(SourceLocation source,
                 Modifiers modifiers,
                 Type resultType,
                 java.lang.String id,
                 Formals formals,
                 TypeDs _throws,
                 BlockStmt block)

MethodDec

public MethodDec(Modifiers modifiers,
                 MethodDec methdec)

MethodDec

public MethodDec(SourceLocation location,
                 Modifiers _modifiers,
                 TypeD _resultTypeD,
                 java.lang.String _id,
                 Formals _formals,
                 TypeDs __throws,
                 CodeBody _body)

MethodDec

protected MethodDec(SourceLocation source)
Method Detail

cgTop

public void cgTop(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: Stmt
The purpose of this procedure is to dispatch to #cg, but to perform an invariant check beforehand to make sure the current stack size is zero. This method is final only because it seems unlikely that anybody would want to override it (they should rather provide a definition for #cg). If there is a good reason to override this, the final modifier can be removed.

Specified by:
cgTop in interface AspectMember
Overrides:
cgTop in class Stmt

postFixAST

public ASTObject postFixAST(org.aspectj.compiler.base.ASTFixerPass fixer)
Overrides:
postFixAST in class ASTObject

postImplementMixin

public ASTObject postImplementMixin(org.aspectj.compiler.crosscuts.MixinImplementationPass fixer)
Overrides:
postImplementMixin in class ASTObject

preScope

public void preScope(ScopeWalker walker)
Overrides:
preScope in class CodeDec

getExpr

public Expr getExpr()

toShortString

public java.lang.String toShortString()
Specified by:
toShortString in class Dec

getKind

public java.lang.String getKind()
Specified by:
getKind in class Dec

makeCorrespondingSemanticObject

public SemanticObject makeCorrespondingSemanticObject()
Overrides:
makeCorrespondingSemanticObject in class Dec

getMethod

public Method getMethod()

checkSpec

public void checkSpec()
Overrides:
checkSpec in class CodeDec

isEffectivelyAbstract

public boolean isEffectivelyAbstract(Type inType)

checkOverride

public boolean checkOverride(Type inType,
                             Dec otherDec)
Overrides:
checkOverride in class Dec

overrides

public boolean overrides(MethodDec other)

getMatchingMethods

public java.util.Set getMatchingMethods()

getMatchingSignatureTypes

public java.util.Set getMatchingSignatureTypes()

getBackdoorMethod

public MethodDec getBackdoorMethod()

unparse

public void unparse(org.aspectj.compiler.base.CodeWriter writer)
Specified by:
unparse in interface AspectMember
Overrides:
unparse in class ASTObject

cgCodeMember

protected void cgCodeMember(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: CodeDec
generate code for the body. Assumes there is a body.

Overrides:
cgCodeMember in class CodeDec
Parameters:
cb - the codeBuilder into which to generate code

getDescriptor

public java.lang.String getDescriptor()
Description copied from class: CodeDec
return the bytecode type descriptor for the member.

Overrides:
getDescriptor in class CodeDec

getStackDelta

public int getStackDelta()
Description copied from class: CodeDec
return the change in stack that would result from invoking this codeDec. This is the size of the return value minus the size of the argument values (including the implicit this object). It is typically negative for coded members with arguments.

Overrides:
getStackDelta in class CodeDec

preThreading

public void preThreading(org.aspectj.compiler.base.LocalClassPass.ThreadingWalker walker)
Overrides:
preThreading in class ASTObject

postThreading

public ASTObject postThreading(org.aspectj.compiler.base.LocalClassPass.ThreadingWalker walker)
Overrides:
postThreading in class ASTObject

getResultTypeD

public TypeD getResultTypeD()
Specified by:
getResultTypeD in class CodeDec

setResultTypeD

public void setResultTypeD(TypeD _resultTypeD)

getId

public java.lang.String getId()
Specified by:
getId in class CodeDec

setId

public void setId(java.lang.String _id)
Overrides:
setId in class Dec

copyWalk

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

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