Class AsmManager

java.lang.Object
org.aspectj.asm.AsmManager
All Implemented Interfaces:
IStructureModel

public class AsmManager extends Object implements 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
  • Field Details

    • recordingLastActiveStructureModel

      public static boolean recordingLastActiveStructureModel
    • lastActiveStructureModel

      public static AsmManager lastActiveStructureModel
    • forceSingletonBehaviour

      public static boolean forceSingletonBehaviour
    • attemptIncrementalModelRepairs

      public static boolean attemptIncrementalModelRepairs
    • dumpModelPostBuild

      public static boolean dumpModelPostBuild
    • hierarchy

      protected IHierarchy hierarchy
    • inpathMap

      protected Map<File,​String> inpathMap
  • Method Details

    • createNewStructureModel

      public static AsmManager createNewStructureModel(Map<File,​String> inpathMap)
    • getHierarchy

      public IHierarchy getHierarchy()
    • getRelationshipMap

      public IRelationshipMap 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

      public void addListener(IHierarchyListener listener)
    • removeStructureListener

      public void removeStructureListener(IHierarchyListener listener)
    • removeAllListeners

      public void removeAllListeners()
    • getHandleProvider

      public IElementHandleProvider getHandleProvider()
    • setHandleProvider

      public void setHandleProvider(IElementHandleProvider handleProvider)
    • writeStructureModel

      public void writeStructureModel(String configFilePath)
    • readStructureModel

      public void readStructureModel(String configFilePath)
      Parameters:
      configFilePath - path to an ".lst" file
    • getCanonicalFilePath

      public String getCanonicalFilePath(File f)
    • 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

      public void reportModelInfo(String reasonForReport)
    • dumptree

      public static void dumptree(Writer w, IProgramElement node, int indent) throws IOException
      Throws:
      IOException
    • dumptree

      public static void dumptree(IProgramElement node, int indent) throws IOException
      Throws:
      IOException
    • dumprels

      public void dumprels(Writer w) throws IOException
      Throws:
      IOException
    • removeStructureModelForFiles

      public boolean removeStructureModelForFiles(Writer fw, Collection<File> files) throws IOException
      Removes the hierarchy structure for the specified files from the structure model. Returns true if it deleted anything
      Throws:
      IOException
    • processDelta

      public void processDelta(Collection<File> files_tobecompiled, Set<File> files_added, Set<File> files_deleted)
    • removeRelationshipsTargettingThisType

      public void removeRelationshipsTargettingThisType(String typename)
      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

      public static void verifyAssumption(boolean b, String info)
    • verifyAssumption

      public static void verifyAssumption(boolean b)
    • summarizeModel

      public AsmManager.ModelInfo 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

      public Set<File> 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

      public Set<File> getAspectsWeavingFilesOnLastBuild()
      Returns:
      the Set of aspects that wove files on the last build (either incremental or full build)
    • addAspectInEffectThisBuild

      public void addAspectInEffectThisBuild(File f)
    • setLastActiveStructureModel

      public static void setLastActiveStructureModel(AsmManager structureModel)
    • getHandleElementForInpath

      public String getHandleElementForInpath(String binaryPath)