You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by pc...@apache.org on 2004/04/05 02:06:12 UTC

cvs commit: xml-xmlbeans/v2/jam/src/org/apache/xmlbeans/impl/jam/internal/elements AnnotationValueImpl.java

pcal        2004/04/04 17:06:12

  Modified:    v2/jam/src/org/apache/xmlbeans/impl/jam
                        JAnnotationValue.java
               v2/jam/src/org/apache/xmlbeans/impl/jam/internal/elements
                        AnnotationValueImpl.java
  Log:
  temporarily restore JAnnotationValue.getValue()
  
  Revision  Changes    Path
  1.3       +10 -9     xml-xmlbeans/v2/jam/src/org/apache/xmlbeans/impl/jam/JAnnotationValue.java
  
  Index: JAnnotationValue.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/jam/src/org/apache/xmlbeans/impl/jam/JAnnotationValue.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JAnnotationValue.java	3 Apr 2004 01:21:29 -0000	1.2
  +++ JAnnotationValue.java	5 Apr 2004 00:06:12 -0000	1.3
  @@ -29,15 +29,6 @@
     public JClass getType();
   
   
  -  /**
  -   * <p>Returns the value of this annotation as an Object.  If the value
  -   * is primitive, an instance of one of the java.lang wrappers (e.g. Integer)
  -   * will be returned.</p>
  -   *
  -   * <p>Note that for javadoc tags, this method always returns a String.</p>
  -   */
  -  //public Object getValue();
  -
   
     /**
      * <p>If this member is complex (i.e. an instance of another annotation
  @@ -270,4 +261,14 @@
     //return the 175 type accessor method?
     //public JMethod getAccessor();
   
  +  /**
  +   * @deprecated DO NOT CALL THIS METHOD.  IT WILL BE REMOVED SOON.  This
  +   * method is a bad thing because it forces/allows the caller to make
  +   * assumptions about how the annotation value is actually represented
  +   * in the underlying implementation.  Please use a combination
  +   * of getType() and the various as...() methods instead.
  +   */
  +  public Object getValue();
  +
  +  
   }
  
  
  
  1.5       +5 -2      xml-xmlbeans/v2/jam/src/org/apache/xmlbeans/impl/jam/internal/elements/AnnotationValueImpl.java
  
  Index: AnnotationValueImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/jam/src/org/apache/xmlbeans/impl/jam/internal/elements/AnnotationValueImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AnnotationValueImpl.java	3 Apr 2004 01:21:29 -0000	1.4
  +++ AnnotationValueImpl.java	5 Apr 2004 00:06:12 -0000	1.5
  @@ -69,7 +69,7 @@
   
     public JClass getType() { return mType; }
   
  -//  public Object getValue() { return mValue; }
  +
   
     public JAnnotation asAnnotation() {
       if (mValue instanceof JAnnotation) {
  @@ -311,6 +311,9 @@
         throw new IllegalStateException("Unknown array type "+o.getClass());
       }
   
  -  }
  +   }
   
  +  public Object getValue() {
  +    throw new IllegalStateException("Please do not call JAnnotionValue.getValue()");
  +  }
   }
  
  
  

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