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
Nested ClassesModifier and TypeClassDescriptionstatic classA ModelInfo object captures basic information about the structure model. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic booleanstatic booleanprotected IHierarchystatic AsmManagerstatic boolean -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddListener(IHierarchyListener listener) static AsmManagercreateNewStructureModel(Map<File, String> inpathMap) voidstatic voiddumptree(Writer w, IProgramElement node, int indent) static voiddumptree(IProgramElement node, int indent) voidorg.aspectj.asm.AsmManager.CanonicalFilePathMapgetHandleElementForInpath(String binaryPath) getInlineAnnotations(String sourceFile, boolean showSubMember, boolean showMemberAndType) Constructs map each time it's called.static booleanstatic booleanvoidprocessDelta(Collection<File> files_tobecompiled, Set<File> files_added, Set<File> files_deleted) voidreadStructureModel(String configFilePath) voidvoidremoveRelationshipsTargettingThisType(String typename) two kinds of relationships A affects B B affectedBy A Both of these relationships are added when 'B' is modified.voidremoveStructureListener(IHierarchyListener listener) booleanremoveStructureModelForFiles(Writer fw, Collection<File> files) Removes the hierarchy structure for the specified files from the structure model.voidreportModelInfo(String reasonForReport) voidstatic voidsetCompletingTypeBindings(boolean b) Set to indicate whether we are currently building a structure model, should be set up front.static voidvoidsetHandleProvider(IElementHandleProvider handleProvider) static voidsetLastActiveStructureModel(AsmManager structureModel) static voidsetReporting(String filename, boolean dModel, boolean dRels, boolean dDeltaProcessing, boolean deletefile) static voidsetReporting(String filename, boolean dModel, boolean dRels, boolean dDeltaProcessing, boolean deletefile, IModelFilter aFilter) static voidverifyAssumption(boolean b) static voidverifyAssumption(boolean b, String info) voidwriteStructureModel(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
-