]> source.dussan.org Git - aspectj.git/commitdiff
eliminates all compilation warning messages from the asm module
authoracolyer <acolyer>
Fri, 25 Nov 2005 18:58:25 +0000 (18:58 +0000)
committeracolyer <acolyer>
Fri, 25 Nov 2005 18:58:25 +0000 (18:58 +0000)
asm/src/org/aspectj/asm/AsmManager.java
asm/src/org/aspectj/asm/HierarchyWalker.java
asm/src/org/aspectj/asm/IProgramElement.java
asm/src/org/aspectj/asm/IRelationship.java
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
asm/src/org/aspectj/asm/internal/ProgramElement.java
asm/src/org/aspectj/asm/internal/Relationship.java
asm/src/org/aspectj/asm/internal/RelationshipMap.java

index b6f710d13da725537c246165fc6dcc1d340d40e2..bb75e881e52f56aeceb8099d20ce9c85c5a57003 100644 (file)
@@ -38,7 +38,7 @@ public class AsmManager {
 
     private IElementHandleProvider handleProvider;
     private List structureListeners = new ArrayList();
-       private boolean shouldSaveModel = true;
+//     private boolean shouldSaveModel = true;
 
        
        public void setRelationshipMap(IRelationshipMap irm) { mapper = irm;}
@@ -245,9 +245,9 @@ public class AsmManager {
         return configFilePath.substring(0, configFilePath.lastIndexOf(".lst")) + ".ajsym";
     }
     
-       public void setShouldSaveModel(boolean shouldSaveModel) {
-               this.shouldSaveModel = shouldSaveModel;
-       }
+//     public void setShouldSaveModel(boolean shouldSaveModel) {
+//             this.shouldSaveModel = shouldSaveModel;
+//     }
        
        // ==== implementation of canonical file path map and accessors ==============
 
@@ -700,7 +700,7 @@ public class AsmManager {
 //                     flightrecorder.append("In removeNode, about to chuck away: "+progElem+"\n");
                
                        verifyAssumption(progElem!=null);
-                       boolean deleteOK = false;
+//                     boolean deleteOK = false;
                        IProgramElement parent = progElem.getParent();
 //                     flightrecorder.append("Parent of it is "+parent+"\n");
                        List kids = parent.getChildren();
@@ -710,7 +710,7 @@ public class AsmManager {
                                if (kids.get(i).equals(progElem)) {
                                        kids.remove(i); 
 //                                     flightrecorder.append("Removing it\n");
-                                       deleteOK=true;
+//                                     deleteOK=true;
                                        break;
                                }
                        }
index 775c3b57e60c7f887ef05008416d44f82e1f833f..d2c9bde068bcf768db174d445950cdc7b42016d1 100644 (file)
@@ -21,14 +21,14 @@ package org.aspectj.asm;
  */
 public abstract class HierarchyWalker {
 
-       private IHierarchy hierarchy;
+//     private IHierarchy hierarchy;
 
        public HierarchyWalker() {
                super();
        }
        
        public HierarchyWalker(IHierarchy hierarchy) {
-               this.hierarchy = hierarchy;
+//             this.hierarchy = hierarchy;
     }
 
     protected void preProcess(IProgramElement node) { }
index bbc9205b35ad077a7d415ec2afbb1eb43d02dc7f..b754fa9b929927defb5e6c1ef022fc59f2b7cc2f 100644 (file)
@@ -32,6 +32,7 @@ public interface IProgramElement extends Serializable {
        // Extra stuff
        // Could be just a string but may prove more useful as an object in the long run ...
        public static class ExtraInformation implements Serializable {
+               private static final long serialVersionUID = -3880735494840820638L;
                private String extraInfo;
                public ExtraInformation() { extraInfo = "";}
        
@@ -148,6 +149,8 @@ public interface IProgramElement extends Serializable {
         */
        public static class Modifiers implements Serializable {
                
+               private static final long serialVersionUID = -8279300899976607927L;
+               
                public static final Modifiers STATIC = new Modifiers("static");
                public static final Modifiers FINAL = new Modifiers("final");
                public static final Modifiers ABSTRACT = new Modifiers("abstract");
@@ -180,6 +183,8 @@ public interface IProgramElement extends Serializable {
         */
        public static class Accessibility implements Serializable {
                
+               private static final long serialVersionUID = 5371838588180918519L;
+               
                public static final Accessibility PUBLIC = new Accessibility("public");
                public static final Accessibility PACKAGE = new Accessibility("package");
                public static final Accessibility PROTECTED = new Accessibility("protected");
@@ -209,6 +214,8 @@ public interface IProgramElement extends Serializable {
         */
        public static class Kind implements Serializable {
                
+               private static final long serialVersionUID = -1963553877479266124L;
+
                public static final Kind PROJECT = new Kind("project");
                public static final Kind PACKAGE = new Kind("package");
                public static final Kind FILE = new Kind("file");
index d54f13f7befb438e008343ec0dbaf45bb4c5dd60..7d901e0a91b304c213cf42e23266ab89d00651d3 100644 (file)
@@ -38,7 +38,9 @@ public interface IRelationship extends Serializable {
         */
        public static class Kind implements Serializable {
                
-        public static final Kind DECLARE_WARNING       = new Kind("declare warning");
+               private static final long serialVersionUID = -2691351740214705220L;
+               
+               public static final Kind DECLARE_WARNING       = new Kind("declare warning");
         public static final Kind DECLARE_ERROR         = new Kind("declare error");
                public static final Kind ADVICE_AROUND         = new Kind("around advice");
                public static final Kind ADVICE_AFTERRETURNING = new Kind("after returning advice");
index e1757981ff5eaef75731e8398110960bb7baa9a2..0e69385bbab4e930aa54ccd1d764f43cc086de8a 100644 (file)
@@ -25,7 +25,9 @@ import org.aspectj.bridge.*;
  */
 public class AspectJElementHierarchy implements IHierarchy {
        
-    protected  IProgramElement root = null;
+       private static final long serialVersionUID = 6462734311117048620L;
+       
+       protected  IProgramElement root = null;
     protected String configFile = null;
 
     private Map fileMap = null;
index 0f8cb65919262e9d80cf1a0fd368fb2248ce9f29..4a5d002a0c02ea7537602f2df6600bd496b77a91 100644 (file)
@@ -29,6 +29,8 @@ import org.aspectj.bridge.ISourceLocation;
  */
 public class ProgramElement implements IProgramElement {
                
+       private static final long serialVersionUID = 171673495267384449L;
+       
        protected IProgramElement parent = null;
        protected String name = "";
        // children.listIterator() should support remove() operation
@@ -43,7 +45,7 @@ public class ProgramElement implements IProgramElement {
        private Accessibility accessibility;
        private String declaringType = "";
        private String formalComment = "";
-       private String packageName = null;
+       //private String packageName = null;
        private boolean runnable = false;
        private boolean implementor = false; 
        private boolean overrider = false;
@@ -116,7 +118,7 @@ public class ProgramElement implements IProgramElement {
                this.modifiers = genModifiers(modifiers);
                this.accessibility = accessibility;
                this.declaringType = declaringType;
-               this.packageName = packageName;
+               //this.packageName = packageName;
                this.formalComment = formalComment;
                this.relations = relations;
                cacheByHandle();
index c47fb159ee5259290d7754f18331ec7dfd330bc3..6cef5f3e725950a67dd8ead0964426c4cd495dda 100644 (file)
@@ -25,6 +25,8 @@ import org.aspectj.asm.IRelationship;
  */
 public class Relationship implements IRelationship {
        
+       private static final long serialVersionUID = 3855166397957609120L;
+
        private String name;
        private Kind kind;
        private String sourceHandle;
index a59bdbe23bcab15750d5b43fc5b4fb2a0502a273..377ea873fbd0e483ff0ea9139eb7e6f9ff46020a 100644 (file)
@@ -25,18 +25,21 @@ import org.aspectj.asm.IRelationship.Kind;
  */
 public class RelationshipMap extends HashMap implements IRelationshipMap {
        
-       // As this gets serialized, make the hierarchy transient and
-       // settable
-       private transient IHierarchy hierarchy;
+       private static final long serialVersionUID = 496638323566589643L;
+
+//     // As this gets serialized, make the hierarchy transient and
+//     // settable
+//     private transient IHierarchy hierarchy;
        
        public RelationshipMap() { }
        
        public RelationshipMap(IHierarchy hierarchy) {
-               this.hierarchy = hierarchy;
+//             this.hierarchy = hierarchy;
        }
 
        public void setHierarchy(IHierarchy hierarchy) {
-               this.hierarchy = hierarchy;
+               // commented out as field never read !
+//             this.hierarchy = hierarchy;
        }
        
        public List get(String handle) {