aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoracolyer <acolyer>2003-02-25 17:04:13 +0000
committeracolyer <acolyer>2003-02-25 17:04:13 +0000
commitc1a978da9f01913600c73fd0f60e51f901ea7655 (patch)
tree9c9a59a230c4f9855780b04fa1cf8bdb6ee03afb /asm
parentf7c21e356018647f96483da3177fcbf57b45c5b0 (diff)
downloadaspectj-c1a978da9f01913600c73fd0f60e51f901ea7655.tar.gz
aspectj-c1a978da9f01913600c73fd0f60e51f901ea7655.zip
Bug 33011. Refactored access to file map for easier
testing and debugging.
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/StructureModel.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/asm/src/org/aspectj/asm/StructureModel.java b/asm/src/org/aspectj/asm/StructureModel.java
index 263a32853..17c2fbb16 100644
--- a/asm/src/org/aspectj/asm/StructureModel.java
+++ b/asm/src/org/aspectj/asm/StructureModel.java
@@ -39,16 +39,26 @@ public class StructureModel implements Serializable {
this.root = root;
}
- public Map getFileMap() {
+ private Map getFileMap() {
return fileMap;
}
+ public void addToFileMap( Object key, Object value ){
+ fileMap.put( key, value );
+ }
+
+ public Object findInFileMap( Object key ) {
+ return fileMap.get(key);
+ }
public void setFileMap(HashMap fileMap) {
this.fileMap = fileMap;
}
-
+ public Set getFileMapEntrySet() {
+ return fileMap.entrySet();
+ }
+
public boolean isValid() {
return root != null && fileMap != null;
}
@@ -120,7 +130,8 @@ public class StructureModel implements Serializable {
return StructureModel.NO_STRUCTURE;
} else {
String correctedPath = new File(sourceFile).getCanonicalPath();//.replace('\\', '/');
- StructureNode node = (StructureNode)getFileMap().get(correctedPath);//findFileNode(filePath, model);
+ //StructureNode node = (StructureNode)getFileMap().get(correctedPath);//findFileNode(filePath, model);
+ StructureNode node = (StructureNode)findInFileMap(correctedPath);//findFileNode(filePath, model);
if (node != null) {
return node;
} else {