Package org.codehaus.annogen.override

Examples of org.codehaus.annogen.override.AnnoBeanSet


  // ========================================================================
  // StoredAnnoOverrider implementation

  public AnnoBeanSet findOrCreateStoredAnnoSetFor(ElementId id) {
    AnnoBeanSet out = (AnnoBeanSet)mId2APS.get(id);
    if (out == null) {
      out = new AnnoBeanSetImpl(mContext);
      mId2APS.put(id,out);
    }
    return  out;
View Full Code Here


  // AnnoOverrider implementation

  public void init(AnnoContext ctx) { mContext = ctx; }

  public void modifyAnnos(ElementId id, AnnoBeanSet currentAnnos) {
    AnnoBeanSet stored = (AnnoBeanSet)mId2APS.get(id);
    if (stored == null) return;
    AnnoBean[] proxies = stored.getAll();
    if (proxies == null || proxies.length == 0) return;
    for(int i=0; i<proxies.length; i++) {
      currentAnnos.put(proxies[i]);
    }
  }
View Full Code Here

  /**
   * This method is public only because it makes writing tests a little easier.
   */
   public AnnoBean[] getAnnotations(ElementId id) {
    if (id == null) throw new IllegalArgumentException("null id");
    AnnoBeanSet apsi = new AnnoBeanSetImpl(mContext);
    getIndigenousAnnotations(id,apsi);
    if (mOverrider != null) mOverrider.modifyAnnos(id,apsi);
    return apsi.getAll();
  }
View Full Code Here

      ElementId myBeanId = elementPool.getIdFor(classes[i]);

      /**
       * ...which we then use to create a set of AnnoBeans...
       */
      AnnoBeanSet annos = storedOverrides.findOrCreateStoredAnnoSetFor(myBeanId);

      /**
       * ...in which we create an AnnoBean for the class' DeploymentInfo
       * annotation.  The StoredAnnoOverrider works by simply handing this
       * object back to the AnnoViewer later on,
       */
      DeploymentInfoAnnoBean annoBean = (DeploymentInfoAnnoBean)
        annos.findOrCreateBeanFor(DeploymentInfo.class);

      /**
       * so we can take this opporunity to go ahead and modify the cache size.
       */
      annoBean.set_cacheSize(newCacheSize);
View Full Code Here

TOP

Related Classes of org.codehaus.annogen.override.AnnoBeanSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.