[Bedework-commit] calendarapi r600 - in trunk: annotations/src/org/bedework/calfacade/annotations calFacade/src/org/bedework/calfacade

svnadmin at bedework.org svnadmin at bedework.org
Mon Apr 21 21:35:18 EDT 2008


Author: douglm
Date: 2008-04-21 21:35:12 -0400 (Mon, 21 Apr 2008)
New Revision: 600

Modified:
   trunk/annotations/src/org/bedework/calfacade/annotations/ProxyMethod.java
   trunk/calFacade/src/org/bedework/calfacade/BwEventProxy.java
Log:
Further tweaks to the annotation code. The generated proxy is now very close to the hand built one. In many of the places where it differs the generated version is probably better

Modified: trunk/annotations/src/org/bedework/calfacade/annotations/ProxyMethod.java
===================================================================
--- trunk/annotations/src/org/bedework/calfacade/annotations/ProxyMethod.java	2008-04-21 20:30:28 UTC (rev 599)
+++ trunk/annotations/src/org/bedework/calfacade/annotations/ProxyMethod.java	2008-04-22 01:35:12 UTC (rev 600)
@@ -83,8 +83,15 @@
     int i = 0;
 
     for (ParameterDeclaration par: pars) {
-      proxyOut.print(par.getType().toString());
+      String parType = par.getType().toString();
 
+      if (parType.endsWith(">")) {
+        int pos = parType.indexOf("<");
+        parType = parType.substring(0, pos);
+      }
+
+      proxyOut.print(parType);
+
       i++;
       if (i < sz) {
         proxyOut.print(", ");

Modified: trunk/calFacade/src/org/bedework/calfacade/BwEventProxy.java
===================================================================
--- trunk/calFacade/src/org/bedework/calfacade/BwEventProxy.java	2008-04-21 20:30:28 UTC (rev 599)
+++ trunk/calFacade/src/org/bedework/calfacade/BwEventProxy.java	2008-04-22 01:35:12 UTC (rev 600)
@@ -1203,14 +1203,14 @@
    * ==================================================================== */
 
   /* (non-Javadoc)
-   * @see org.bedework.calfacade.base.AlarmsEntity#setAlarms(java.util.Set)
+   * @see org.bedework.calfacade.BwEvent#setAlarms(java.util.Set)
    */
   public void setAlarms(Set<BwAlarm> val) {
     ref.setAlarms(val);
   }
 
   /* (non-Javadoc)
-   * @see org.bedework.calfacade.base.AlarmsEntity#getAlarms()
+   * @see org.bedework.calfacade.BwEvent#getAlarms()
    */
   public Set<BwAlarm> getAlarms() {
     Set<BwAlarm> c = super.getAlarms();
@@ -1289,13 +1289,64 @@
   }
 
   /* ====================================================================
+   *                   Recipients methods
+   * ==================================================================== */
+
+  /* (non-Javadoc)
+   * @see org.bedework.calfacade.BwEvent#setRecipients(java.util.Set)
+   */
+  public void setRecipients(Set<String> val) {
+    ref.setRecipients(val);
+  }
+
+  /* (non-Javadoc)
+   * @see org.bedework.calfacade.BwEvent#getRecipients()
+   */
+  public Set<String> getRecipients() {
+    Set<String> c = super.getRecipients();
+    if (c == null) {
+      c = new OverrideSet<String>() {
+        public void setOverrideCollection(Set<String> val) {
+          ref.setRecipients(val);
+        }
+
+        public Set<String> getOverrideCollection() {
+          return ref.getRecipients();
+        }
+
+        public Set<String> getMasterCollection() {
+          return getTarget().getRecipients();
+        }
+
+        public void setOverrideIsEmpty(Boolean val) {
+          ref.setRecipientsEmpty(val);
+        }
+
+        public Boolean getOverrideIsEmpty() {
+          return ref.getRecipientsEmpty();
+        }
+      };
+
+      super.setRecipients(c);
+    }
+
+    return c;
+  }
+
+  /* ====================================================================
    *               CategorisedEntity interface methods
    * ==================================================================== */
 
+  /* (non-Javadoc)
+   * @see org.bedework.calfacade.BwEvent#setCategories(java.util.Set)
+   */
   public void setCategories(Set<BwCategory> val) {
     ref.setCategories(val);
   }
 
+  /* (non-Javadoc)
+   * @see org.bedework.calfacade.BwEvent#getCategories()
+   */
   public Set<BwCategory> getCategories() {
     Set<BwCategory> c = super.getCategories();
     if (c == null) {
@@ -1556,53 +1607,6 @@
   }
 
   /* ====================================================================
-   *                   Recipients methods
-   * ==================================================================== */
-
-  /** Set the recipients Set
-   *
-   * @param val    Set of (String)recipients
-   */
-  public void setRecipients(Set<String> val) {
-    ref.setRecipients(val);
-  }
-
-  /** Get the recipients
-   *
-   *  @return Set     recipients set
-   */
-  public Set<String> getRecipients() {
-    Set<String> c = super.getRecipients();
-    if (c == null) {
-      c = new OverrideSet<String>() {
-        public void setOverrideCollection(Set<String> val) {
-          ref.setRecipients(val);
-        }
-
-        public Set<String> getOverrideCollection() {
-          return ref.getRecipients();
-        }
-
-        public Set<String> getMasterCollection() {
-          return getTarget().getRecipients();
-        }
-
-        public void setOverrideIsEmpty(Boolean val) {
-          ref.setRecipientsEmpty(val);
-        }
-
-        public Boolean getOverrideIsEmpty() {
-          return ref.getRecipientsEmpty();
-        }
-      };
-
-      super.setRecipients(c);
-    }
-
-    return c;
-  }
-
-  /* ====================================================================
    *                   Convenience methods
    * ==================================================================== */
 



More information about the Bedework-commit mailing list