Package org.aspectj.asm
Class AsmManager
java.lang.Object
org.aspectj.asm.AsmManager
- All Implemented Interfaces:
IStructureModel
The Abstract Structure Model (ASM) represents the containment hierarchy and crosscutting structure map for AspectJ programs. It
is used by IDE views such as the document outline, and by other tools such as ajdoc to show both AspectJ declarations and
crosscutting links, such as which advice affects which join point shadows.
- Author:
- Mik Kersten, Andy Clement
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A ModelInfo object captures basic information about the structure model. -
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
static boolean
static boolean
protected IHierarchy
static AsmManager
static boolean
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addListener
(IHierarchyListener listener) static AsmManager
createNewStructureModel
(Map<File, String> inpathMap) void
static void
dumptree
(Writer w, IProgramElement node, int indent) static void
dumptree
(IProgramElement node, int indent) void
org.aspectj.asm.AsmManager.CanonicalFilePathMap
getHandleElementForInpath
(String binaryPath) getInlineAnnotations
(String sourceFile, boolean showSubMember, boolean showMemberAndType) Constructs map each time it's called.static boolean
static boolean
void
processDelta
(Collection<File> files_tobecompiled, Set<File> files_added, Set<File> files_deleted) void
readStructureModel
(String configFilePath) void
void
removeRelationshipsTargettingThisType
(String typename) two kinds of relationships A affects B B affectedBy A Both of these relationships are added when 'B' is modified.void
removeStructureListener
(IHierarchyListener listener) boolean
removeStructureModelForFiles
(Writer fw, Collection<File> files) Removes the hierarchy structure for the specified files from the structure model.void
reportModelInfo
(String reasonForReport) void
static void
setCompletingTypeBindings
(boolean b) Set to indicate whether we are currently building a structure model, should be set up front.static void
void
setHandleProvider
(IElementHandleProvider handleProvider) static void
setLastActiveStructureModel
(AsmManager structureModel) static void
setReporting
(String filename, boolean dModel, boolean dRels, boolean dDeltaProcessing, boolean deletefile) static void
setReporting
(String filename, boolean dModel, boolean dRels, boolean dDeltaProcessing, boolean deletefile, IModelFilter aFilter) static void
verifyAssumption
(boolean b) static void
verifyAssumption
(boolean b, String info) void
writeStructureModel
(String configFilePath)
-
Field Details
-
recordingLastActiveStructureModel
public static boolean recordingLastActiveStructureModel -
lastActiveStructureModel
-
forceSingletonBehaviour
public static boolean forceSingletonBehaviour -
attemptIncrementalModelRepairs
public static boolean attemptIncrementalModelRepairs -
dumpModelPostBuild
public static boolean dumpModelPostBuild -
hierarchy
-
inpathMap
-
-
Method Details
-
createNewStructureModel
-
getHierarchy
-
getRelationshipMap
-
fireModelUpdated
public void fireModelUpdated() -
getInlineAnnotations
public HashMap<Integer,List<IProgramElement>> getInlineAnnotations(String sourceFile, boolean showSubMember, boolean showMemberAndType) Constructs map each time it's called. -
addListener
-
removeStructureListener
-
removeAllListeners
public void removeAllListeners() -
getHandleProvider
-
setHandleProvider
-
writeStructureModel
-
readStructureModel
- Parameters:
configFilePath
- path to an ".lst" file
-
getCanonicalFilePath
-
getCanonicalFilePathMap
public org.aspectj.asm.AsmManager.CanonicalFilePathMap getCanonicalFilePathMap() -
setReporting
public static void setReporting(String filename, boolean dModel, boolean dRels, boolean dDeltaProcessing, boolean deletefile) -
setReporting
public static void setReporting(String filename, boolean dModel, boolean dRels, boolean dDeltaProcessing, boolean deletefile, IModelFilter aFilter) -
isReporting
public static boolean isReporting() -
setDontReport
public static void setDontReport() -
reportModelInfo
-
dumptree
- Throws:
IOException
-
dumptree
- Throws:
IOException
-
dumprels
- Throws:
IOException
-
removeStructureModelForFiles
Removes the hierarchy structure for the specified files from the structure model. Returns true if it deleted anything- Throws:
IOException
-
processDelta
-
removeRelationshipsTargettingThisType
two kinds of relationships A affects B B affectedBy A Both of these relationships are added when 'B' is modified. Concrete examples are 'advises/advisedby' or 'annotates/annotatedby'. What we need to do is when 'B' is going to be woven, remove all relationships that may reoccur when it is woven. So - remove 'affects' relationships where the target is 'B', remove all 'affectedBy' relationships where the source is 'B'. -
verifyAssumption
-
verifyAssumption
public static void verifyAssumption(boolean b) -
summarizeModel
-
setCompletingTypeBindings
public static void setCompletingTypeBindings(boolean b) Set to indicate whether we are currently building a structure model, should be set up front. -
isCompletingTypeBindings
public static boolean isCompletingTypeBindings() -
resetDeltaProcessing
public void resetDeltaProcessing() -
getModelChangesOnLastBuild
- Returns:
- the Set of files for which the structure model was modified (they may have been removed or otherwise rebuilt). Set is empty for a full build.
-
getAspectsWeavingFilesOnLastBuild
- Returns:
- the Set of aspects that wove files on the last build (either incremental or full build)
-
addAspectInEffectThisBuild
-
setLastActiveStructureModel
-
getHandleElementForInpath
-