Author: j...@google.com
Date: Fri Feb  6 08:56:43 2009
New Revision: 4651

Modified:
     
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/BinaryCompilationUnitBuilder.java
     
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationState.java

Log:
Add TODO about linking source to binary, added getters in preparation for  
TypeOracle work.


Modified:  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/BinaryCompilationUnitBuilder.java
==============================================================================
---  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/BinaryCompilationUnitBuilder.java
  
(original)
+++  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/BinaryCompilationUnitBuilder.java
  
Fri Feb  6 08:56:43 2009
@@ -86,6 +86,69 @@
          }
        }

+      /**
+       * @return the access
+       */
+      public int getAccess() {
+        return access;
+      }
+
+      /**
+       * @return the annotations
+       */
+      public List<MyAnnotationVisitor> getAnnotations() {
+        return annotations;
+      }
+
+      /**
+       * @return the argNames
+       */
+      public String[] getArgNames() {
+        return argNames;
+      }
+
+      /**
+       * @return the argTypes
+       */
+      public Type[] getArgTypes() {
+        return argTypes;
+      }
+
+      /**
+       * @return the desc
+       */
+      public String getDesc() {
+        return desc;
+      }
+
+      /**
+       * @return the exceptions
+       */
+      public String[] getExceptions() {
+        return exceptions;
+      }
+
+      /**
+       * @return the name
+       */
+      public String getName() {
+        return name;
+      }
+
+      /**
+       * @return the signature
+       */
+      public String getSignature() {
+        return signature;
+      }
+
+      /**
+       * @return the actualArgNames
+       */
+      public boolean hasActualArgNames() {
+        return actualArgNames;
+      }
+
        @Override
        public AnnotationVisitor visitAnnotation(String desc, boolean  
visible) {
          // TODO Auto-generated method stub
@@ -93,13 +156,7 @@
          annotations.add(av);
          return av;
        }
-
-      @Override
-      public void visitEnd() {
-        // TODO(jat): do we need to do anything here?
-        super.visitEnd();
-      }
-
+
        @Override
        public void visitLocalVariable(String name, String desc,
            String signature, Label start, Label end, int index) {
@@ -122,6 +179,7 @@
      private String[] interfaces;
      private byte[] bytes;
      private Resource classResource;
+    private List<MyMethodVisitor> methods = new  
ArrayList<MyMethodVisitor>();

      public BinaryCompiledClassVisitor(Resource classResource, byte[]  
bytes) {
        this.classResource = classResource;
@@ -136,6 +194,69 @@
      }

      /**
+     * @return the bytes
+     */
+    public byte[] getBytes() {
+      return bytes;
+    }
+
+    /**
+     * @return the classResource
+     */
+    public Resource getClassResource() {
+      return classResource;
+    }
+
+    /**
+     * @return the innerClasses
+     */
+    public List<Resource> getInnerClasses() {
+      return innerClasses;
+    }
+
+    /**
+     * @return the interfaces
+     */
+    public String[] getInterfaces() {
+      return interfaces;
+    }
+
+    /**
+     * @return the methods
+     */
+    public List<MyMethodVisitor> getMethods() {
+      return methods;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+      return name;
+    }
+
+    /**
+     * @return the signature
+     */
+    public String getSignature() {
+      return signature;
+    }
+
+    /**
+     * @return the source
+     */
+    public String getSource() {
+      return source;
+    }
+
+    /**
+     * @return the superName
+     */
+    public String getSuperName() {
+      return superName;
+    }
+
+    /**
       * Called at the beginning of visiting the class.
       *
       * @param version classfile version (ie, Opcodes.V1_5 etc)
@@ -197,7 +318,10 @@
        if ((access & Opcodes.ACC_NATIVE) != 0) {
          throw new ClassNotSuitableException("Has native methods");
        }
-      return new MyMethodVisitor(access, name, desc, signature,  
exceptions);
+      MyMethodVisitor mv = new MyMethodVisitor(access, name, desc,  
signature,
+          exceptions);
+      methods.add(mv);
+      return mv;
      }

      @Override
@@ -230,6 +354,20 @@
        this.desc = desc;
        this.visible = visible;
      }
+
+    /**
+     * @return the desc
+     */
+    public String getDesc() {
+      return desc;
+    }
+
+    /**
+     * @return the visible
+     */
+    public boolean isVisible() {
+      return visible;
+    }
    }

    private final Map<String, Resource> binaryMap;
@@ -268,9 +406,7 @@
          continue;
        }
        seen.add(compiledClass);
-      if (compiledClass != null) {
-        classes.add(compiledClass);
-      }
+      classes.add(compiledClass);
      }
      if (classes.isEmpty()) {
        return null;

Modified:  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationState.java
==============================================================================
---  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationState.java     
 
(original)
+++  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationState.java     
 
Fri Feb  6 08:56:43 2009
@@ -276,6 +276,9 @@
        return;
      }
      Map<String, Resource> newBinaryMap = binaryOracle.getResourceMap();
+    // TODO(jat): keep a map of source resources to match up with a given
+    // binary resource -- needed so we can load the source on demand for
+    // parameter names.

      // Divide resources into changed and unchanged.
      Set<JavaSourceFile> unchangedSrc = new HashSet<JavaSourceFile>(

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to