org.aspectj.compiler.base.ast
Class FieldDec
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.VarDec
org.aspectj.compiler.base.ast.FieldDec
- All Implemented Interfaces:
- AspectMember, ClassMember
- public class FieldDec
- extends VarDec
Methods inherited from class org.aspectj.compiler.base.ast.VarDec |
cgStmt, checkAssignmentType, checkSpec, getChildAt, getChildCount, getChildNameAt, getDescriptor, getExpr, getFrameLoc, getId, getInitializer, getModifiers, getType, getTypeD, inStaticContext, isBlank, isIntroduced, postAssignmentCheck, preAssignmentCheck, preScope, setChildAt, setId, setInitializer, setModifiers, setTypeD, unparse, walkFlow |
Methods inherited from class org.aspectj.compiler.base.ast.Dec |
addIntroducedFromType, checkOverride, cleanup, conflictsWith, dominates, forcePublic, getBytecodeId, getCorrespondingSemanticObject, getDeclaringType, getLexicalType, getName, getOutermostLexicalType, getSignatureString, getStackDelta, isAbstract, isAccessible, isAccessible, isAlmostApplicable, isApplicable, isDeprecated, isFinal, isInherited, isLanguageVisible, isMoreAccessibleThan, isMoreSpecificThan, isPrivate, isProtected, isPublic, isStatic, isSynthetic, lookupDeclaringType, lookupLexicalType, makeBlockScope, postCopy, preCopy, preMove, requireStmt, samePackage, setAllEnclosingTypes, setBytecodeId, setDeclaringType, setDeprecated, setExplicitlyNonSynthetic, setFromLexicalScope, setLanguageVisible, setLexicalType, writeModifiers, writeNames |
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, getEndColumn, getEndLine, getEndPosition, getFormalComment, getOutermostBytecodeType, getParent, getSourceDirectoryName, getSourceFile, getSourceFileName, getSourceLocation, getStartPosition, hasLegalProtectedAccess, hasSource, hasSourceLocation, implementMixin, indexOf, isLeaf, makeChild, makeChild, postCleanup, postInnerAccess, postInnerInfo, postLift, postMove, postScope, postThreading, preIntroduction, preLift, preThreading, remove, remove, removeChildAt, replaceWith, setFormalComment, setParent, setParents, setSource, setSourceLocation, setSyntheticSource, showError, showMessage, showTypeError, showWarning, toString, unparse, walk, walkAnalysis, walkCleanup, walkMemberMunger |
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 |
FieldDec
public FieldDec(SourceLocation location,
Modifiers _modifiers,
TypeD _typeD,
java.lang.String _id,
Expr _initializer)
FieldDec
public FieldDec(Modifiers _modifiers,
TypeD _typeD,
Identifier _id,
Expr _initializer)
FieldDec
protected FieldDec(SourceLocation source)
getEnclosingDec
public Dec getEnclosingDec()
- Overrides:
getEnclosingDec
in class ASTObject
walkAssignmentCheck
public void walkAssignmentCheck(org.aspectj.compiler.base.AssignmentCheckerPass walker)
- We need to do this because we can't properly do name binding of
a reference to a field until we've done constant folding.
Actually what we can't do is type checking of assignment
statements until we've done folding.
This isn't true for method look-up...
static final int x = 2;
byte b = x + 1; // this can't be type checked until we know whether or not x
// is a constant
We can fix this by splitting into:
name-binding
constant-folding: this unfortunately can't be just a walker
assignment type checking
- Overrides:
walkAssignmentCheck
in class ASTObject
isFolded
public boolean isFolded()
ensureFolded
public void ensureFolded(org.aspectj.compiler.base.AssignmentCheckerPass walker)
isField
public boolean isField()
- Overrides:
isField
in class VarDec
toShortString
public java.lang.String toShortString()
- Overrides:
toShortString
in class VarDec
makeCorrespondingSemanticObject
public SemanticObject makeCorrespondingSemanticObject()
- Overrides:
makeCorrespondingSemanticObject
in class Dec
getField
public Field getField()
getKind
public java.lang.String getKind()
- Overrides:
getKind
in class VarDec
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
walkScope
public void walkScope(ScopeWalker walker)
- Overrides:
walkScope
in class ASTObject
getBackdoorGetterMethod
public MethodDec getBackdoorGetterMethod()
getBackdoorSetterMethod
public MethodDec getBackdoorSetterMethod()
unparse
public void unparse(org.aspectj.compiler.base.CodeWriter writer)
- Specified by:
unparse
in interface AspectMember
- Overrides:
unparse
in class VarDec
isConstant
public boolean isConstant()
getAssignExpr
public AssignExpr getAssignExpr()
walkForwardReference
public void walkForwardReference(org.aspectj.compiler.base.ForwardReferenceChecker w)
- Overrides:
walkForwardReference
in class Dec
walkInnerInfo
public void walkInnerInfo(org.aspectj.compiler.base.InnerInfoPass w)
- Overrides:
walkInnerInfo
in class ASTObject
walkFrameLoc
public void walkFrameLoc(org.aspectj.compiler.base.FrameLocPass walker)
- Overrides:
walkFrameLoc
in class VarDec
cgMember
protected void cgMember(org.aspectj.compiler.base.bcg.ClassfileBuilder cb)
- This method takes care of generating code for Member decs. At
this point, we should not have initializers unless they're
constants.
- Overrides:
cgMember
in class Dec
copyWalk
public ASTObject copyWalk(CopyWalker walker)
- Overrides:
copyWalk
in class VarDec
getDefaultDisplayName
public java.lang.String getDefaultDisplayName()
- Overrides:
getDefaultDisplayName
in class VarDec