xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: xml-xmlbeans/v2/jam/src15/org/apache/xmlbeans/impl/jam/internal/java15 Javadoc15DelegateImpl.java
Date Mon, 19 Jul 2004 17:49:26 GMT
pcal        2004/07/19 10:49:26

  Modified:    v2/jam/src/org/apache/xmlbeans/impl/jam
                        JamServiceFactory.java
               v2/jam/src/org/apache/xmlbeans/impl/jam/internal/javadoc
                        Javadoc15Delegate.java
               v2/jam/src15/org/apache/xmlbeans/impl/jam/internal/java15
                        Javadoc15DelegateImpl.java
  Log:
  improve annotation defaults flag
  
  Revision  Changes    Path
  1.7       +0 -8      xml-xmlbeans/v2/jam/src/org/apache/xmlbeans/impl/jam/JamServiceFactory.java
  
  Index: JamServiceFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/jam/src/org/apache/xmlbeans/impl/jam/JamServiceFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JamServiceFactory.java	19 Jul 2004 03:58:48 -0000	1.6
  +++ JamServiceFactory.java	19 Jul 2004 17:49:26 -0000	1.7
  @@ -96,14 +96,6 @@
      */
     public abstract JamClassLoader createJamClassLoader(ClassLoader cl);
   
  -
  -
  -//temporary
  -  public static boolean ANNOTATION_DEFAULTS_ENABLED = false;
  -  public static final void setAnnotationDefaultsEnabled(boolean b) {
  -    ANNOTATION_DEFAULTS_ENABLED = b;
  -  }
  -
     // ========================================================================
     // main() method
   
  
  
  
  1.3       +4 -0      xml-xmlbeans/v2/jam/src/org/apache/xmlbeans/impl/jam/internal/javadoc/Javadoc15Delegate.java
  
  Index: Javadoc15Delegate.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/jam/src/org/apache/xmlbeans/impl/jam/internal/javadoc/Javadoc15Delegate.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Javadoc15Delegate.java	25 May 2004 20:44:43 -0000	1.2
  +++ Javadoc15Delegate.java	19 Jul 2004 17:49:26 -0000	1.3
  @@ -29,6 +29,10 @@
    */
   public interface Javadoc15Delegate {
   
  +//temporary
  +public static final String ANNOTATION_DEFAULTS_ENABLED_PROPERTY =
  +  "Javadoc15DelegateImpl.ANNOTATION_DEFAULTS_ENABLED_PROPERTY";
  +
     public void init(ElementContext ctx);
   
     public void extractAnnotations(MAnnotatedElement dest,
  
  
  
  1.9       +10 -3     xml-xmlbeans/v2/jam/src15/org/apache/xmlbeans/impl/jam/internal/java15/Javadoc15DelegateImpl.java
  
  Index: Javadoc15DelegateImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/jam/src15/org/apache/xmlbeans/impl/jam/internal/java15/Javadoc15DelegateImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Javadoc15DelegateImpl.java	19 Jul 2004 03:58:48 -0000	1.8
  +++ Javadoc15DelegateImpl.java	19 Jul 2004 17:49:26 -0000	1.9
  @@ -20,7 +20,7 @@
   import org.apache.xmlbeans.impl.jam.internal.javadoc.JavadocClassBuilder;
   import org.apache.xmlbeans.impl.jam.internal.elements.ElementContext;
   import org.apache.xmlbeans.impl.jam.JClass;
  -import org.apache.xmlbeans.impl.jam.JamServiceFactory;
  +import org.apache.xmlbeans.impl.jam.provider.JamServiceContext;
   import com.sun.javadoc.ProgramElementDoc;
   import com.sun.javadoc.AnnotationDesc;
   import com.sun.javadoc.Parameter;
  @@ -42,7 +42,14 @@
   
   //temporary
   public static final void setDefaultsEnabled(boolean b) {
  -  JamServiceFactory.setAnnotationDefaultsEnabled(b);
  +  ANNOTATION_DEFAULTS_ENABLED = b;
  +}
  +public static boolean ANNOTATION_DEFAULTS_ENABLED = false;
  +
  +private final boolean useAnnotationDefaults() {
  +  return ANNOTATION_DEFAULTS_ENABLED ||
  +    (mContext != null &&
  +    ((JamServiceContext)mContext).getProperty(ANNOTATION_DEFAULTS_ENABLED_PROPERTY) !=
null);
   }
   
     // ========================================================================
  @@ -107,7 +114,7 @@
           setAnnotationValue(name,jmt,aval,dest,sp);
         }
       }
  -if (!JamServiceFactory.ANNOTATION_DEFAULTS_ENABLED) return;
  +if (!useAnnotationDefaults()) return;
       { // also set values for the type's defaults
         AnnotationTypeDoc atd = src.annotationType();
         AnnotationTypeElementDoc[] elements = atd.elements();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org


Mime
View raw message