org.aspectj.compiler.base.ast
Class MajCompilationUnit
java.lang.Object
org.aspectj.compiler.base.CompilerObject
org.aspectj.compiler.base.ast.ASTObject
org.aspectj.compiler.base.ast.CompilationUnit
org.aspectj.compiler.base.ast.MajCompilationUnit
- All Implemented Interfaces:
- CompUnit
- public class MajCompilationUnit
- extends CompilationUnit
- implements CompUnit
Constructor Summary |
|
MajCompilationUnit(MajPackageExpr _package,
Imports _imports,
Decs _decs)
|
protected |
MajCompilationUnit(SourceLocation source)
|
|
MajCompilationUnit(SourceLocation location,
MajPackageExpr _package,
Imports _imports,
Decs _decs,
org.aspectj.compiler.base.parser.SourceInfo _sourceInfo,
boolean _scanned)
|
|
MajCompilationUnit(SourceLocation location,
java.lang.String _packageName,
Imports _imports,
Decs _decs,
org.aspectj.compiler.base.parser.SourceInfo _sourceInfo,
boolean _scanned)
|
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, getComment, getEnclosingDec, getEndColumn, getEndLine, getEndPosition, getFormalComment, getOutermostBytecodeType, getOutermostLexicalType, getParent, getSourceDirectoryName, getSourceFileName, getSourceLocation, getStartPosition, hasLegalProtectedAccess, hasSource, hasSourceLocation, implementMixin, indexOf, inStaticContext, isLanguageVisible, isLeaf, isSynthetic, makeChild, makeChild, postAssignmentCheck, postCleanup, postCopy, postFixAST, postImplementMixin, postInnerAccess, postInnerInfo, postLift, postMove, postScope, postThreading, preAssignmentCheck, preCopy, preIntroduction, preLift, preMove, preThreading, remove, remove, removeChildAt, replaceWith, setFormalComment, setParent, setParents, setSource, setSourceLocation, setSyntheticSource, showError, showMessage, showTypeError, showWarning, toShortString, unparse, walk, walkAnalysis, walkAssignmentCheck, walkCleanup, walkFlow, walkForwardReference, 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 |
Methods inherited from interface org.aspectj.compiler.base.ast.CompUnit |
unparse |
packageName
protected java.lang.String packageName
imports
protected Imports imports
decs
protected Decs decs
sourceInfo
protected org.aspectj.compiler.base.parser.SourceInfo sourceInfo
scanned
protected boolean scanned
MajCompilationUnit
public MajCompilationUnit(SourceLocation location,
java.lang.String _packageName,
Imports _imports,
Decs _decs,
org.aspectj.compiler.base.parser.SourceInfo _sourceInfo,
boolean _scanned)
MajCompilationUnit
public MajCompilationUnit(SourceLocation location,
MajPackageExpr _package,
Imports _imports,
Decs _decs,
org.aspectj.compiler.base.parser.SourceInfo _sourceInfo,
boolean _scanned)
MajCompilationUnit
public MajCompilationUnit(MajPackageExpr _package,
Imports _imports,
Decs _decs)
MajCompilationUnit
protected MajCompilationUnit(SourceLocation source)
getDefinedTypes
public java.util.List getDefinedTypes()
- Overrides:
getDefinedTypes
in class CompilationUnit
addDefinedType
public void addDefinedType(TypeDec dec)
- Overrides:
addDefinedType
in class CompilationUnit
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 CompilationUnit
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 CompilationUnit
getBytecodeTypeDec
public TypeDec getBytecodeTypeDec()
- Description copied from class:
ASTObject
- not part of the language's semantic model, but part of the compiler's
generated code model. This will return the type declaration
that will actually be
enclosing this point in the bytecodes produced by the compiler.
- Overrides:
getBytecodeTypeDec
in class CompilationUnit
getEnclosingCodeDec
public CodeDec getEnclosingCodeDec()
- Overrides:
getEnclosingCodeDec
in class CompilationUnit
getScope
public org.aspectj.compiler.base.cst.CUScope getScope()
- Overrides:
getScope
in class CompilationUnit
preScope
public void preScope(ScopeWalker walker)
- Overrides:
preScope
in class CompilationUnit
toString
public java.lang.String toString()
- Overrides:
toString
in class CompilationUnit
cleanup
public void cleanup()
- Overrides:
cleanup
in class CompilationUnit
cleanupDefinedTypes
public void cleanupDefinedTypes()
- Overrides:
cleanupDefinedTypes
in class CompilationUnit
getSourceCanonicalPath
public java.lang.String getSourceCanonicalPath()
- Overrides:
getSourceCanonicalPath
in class CompilationUnit
getSourceDirectory
public java.lang.String getSourceDirectory()
- Overrides:
getSourceDirectory
in class CompilationUnit
getSourceFile
public java.io.File getSourceFile()
- Overrides:
getSourceFile
in class CompilationUnit
getLine
public int getLine(int position)
- Overrides:
getLine
in class CompilationUnit
getColumn
public int getColumn(int position)
- Overrides:
getColumn
in class CompilationUnit
getCompilationUnit
public CompilationUnit getCompilationUnit()
- Overrides:
getCompilationUnit
in class CompilationUnit
addTypesToTypeGraph
public void addTypesToTypeGraph()
- Overrides:
addTypesToTypeGraph
in class CompilationUnit
buildSignatures
public void buildSignatures()
- Overrides:
buildSignatures
in class CompilationUnit
checkSpec
public void checkSpec()
- Overrides:
checkSpec
in class CompilationUnit
unparse
public void unparse(org.aspectj.compiler.base.CodeWriter writer)
- Overrides:
unparse
in class CompilationUnit
getPackageName
public java.lang.String getPackageName()
- Overrides:
getPackageName
in class CompilationUnit
setPackageName
public void setPackageName(java.lang.String _packageName)
- Overrides:
setPackageName
in class CompilationUnit
getImports
public Imports getImports()
- Overrides:
getImports
in class CompilationUnit
setImports
public void setImports(Imports _imports)
- Overrides:
setImports
in class CompilationUnit
getDecs
public Decs getDecs()
- Overrides:
getDecs
in class CompilationUnit
setDecs
public void setDecs(Decs _decs)
- Overrides:
setDecs
in class CompilationUnit
getSourceInfo
public org.aspectj.compiler.base.parser.SourceInfo getSourceInfo()
- Overrides:
getSourceInfo
in class CompilationUnit
setSourceInfo
public void setSourceInfo(org.aspectj.compiler.base.parser.SourceInfo _sourceInfo)
- Overrides:
setSourceInfo
in class CompilationUnit
getScanned
public boolean getScanned()
- Overrides:
getScanned
in class CompilationUnit
setScanned
public void setScanned(boolean _scanned)
- Overrides:
setScanned
in class CompilationUnit
copyWalk
public ASTObject copyWalk(CopyWalker walker)
- Overrides:
copyWalk
in class CompilationUnit
getChildAt
public ASTObject getChildAt(int childIndex)
- Overrides:
getChildAt
in class CompilationUnit
getChildNameAt
public java.lang.String getChildNameAt(int childIndex)
- Overrides:
getChildNameAt
in class CompilationUnit
setChildAt
public void setChildAt(int childIndex,
ASTObject child)
- Overrides:
setChildAt
in class CompilationUnit
getChildCount
public int getChildCount()
- Overrides:
getChildCount
in class CompilationUnit
getDefaultDisplayName
public java.lang.String getDefaultDisplayName()
- Overrides:
getDefaultDisplayName
in class CompilationUnit