# HG changeset patch # User wleggette # Date 1240862549 18000 # Branch clean # Node ID 25c4dd328d2d4f8fc24d71f090a41b3f78f40893 # Parent edbf436314aec56d4a01b697216564ed6d2a1e91 imported patch annotation-fixes.patch
diff -r edbf436314ae -r 25c4dd328d2d src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java --- a/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java Wed Apr 22 17:38:40 2009 -0500 +++ b/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java Mon Apr 27 15:02:29 2009 -0500 @@ -467,15 +467,21 @@ } // Only need newInstance() for non-abstract types - if (sType.isAbstract()) + if (sType.isAbstract()) { emit("/** @deprecated No need to be able to create instances of abstract types */"); + if (_useJava15) + emit("@Deprecated"); + } emit("public static " + fullName + " newInstance() {"); emit(" return (" + fullName + ") org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }"); emit(""); // Only need newInstance() for non-abstract types - if (sType.isAbstract()) + if (sType.isAbstract()) { emit("/** @deprecated No need to be able to create instances of abstract types */"); + if (_useJava15) + emit("@Deprecated"); + } emit("public static " + fullName + " newInstance(org.apache.xmlbeans.XmlOptions options) {"); emit(" return (" + fullName + ") org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }"); emit(""); @@ -541,23 +547,31 @@ emit(""); emit("/** @deprecated {...@link org.apache.xmlbeans.xml.stream.XMLInputStream} */"); + if (_useJava15) + emit("@Deprecated"); emit("public static " + fullName + " parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {"); emit(" return (" + fullName + ") org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }"); emit(""); emit("/** @deprecated {...@link org.apache.xmlbeans.xml.stream.XMLInputStream} */"); + if (_useJava15) + emit("@Deprecated"); emit("public static " + fullName + " parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {"); emit(" return (" + fullName + ") org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }"); emit(""); // Don't have XMLInputStream anymore emit("/** @deprecated {...@link org.apache.xmlbeans.xml.stream.XMLInputStream} */"); + if (_useJava15) + emit("@Deprecated"); emit("public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {"); emit(" return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }"); emit(""); // Don't have XMLInputStream anymore emit("/** @deprecated {...@link org.apache.xmlbeans.xml.stream.XMLInputStream} */"); + if (_useJava15) + emit("@Deprecated"); emit("public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {"); emit(" return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }"); emit(""); @@ -717,8 +731,12 @@ emit("java.math.BigInteger getBigIntegerValue();"); emit("void setBigIntegerValue(java.math.BigInteger bi);"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("java.math.BigInteger bigIntegerValue();"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("void set(java.math.BigInteger bi);"); } else if (bits == SchemaType.SIZE_LONG) @@ -726,8 +744,12 @@ emit("long getLongValue();"); emit("void setLongValue(long l);"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("long longValue();"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("void set(long l);"); } else if (bits == SchemaType.SIZE_INT) @@ -735,8 +757,12 @@ emit("int getIntValue();"); emit("void setIntValue(int i);"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("int intValue();"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("void set(int i);"); } else if (bits == SchemaType.SIZE_SHORT) @@ -744,8 +770,12 @@ emit("short getShortValue();"); emit("void setShortValue(short s);"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("short shortValue();"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("void set(short s);"); } else if (bits == SchemaType.SIZE_BYTE) @@ -753,8 +783,12 @@ emit("byte getByteValue();"); emit("void setByteValue(byte b);"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("byte byteValue();"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("void set(byte b);"); } } @@ -765,8 +799,12 @@ emit("java.lang.Object getObjectValue();"); emit("void setObjectValue(java.lang.Object val);"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("java.lang.Object objectValue();"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("void objectSet(java.lang.Object val);"); emit("org.apache.xmlbeans.SchemaType instanceType();"); SchemaType ctype = sType.getUnionCommonBaseType(); @@ -780,10 +818,16 @@ emit("java.util.List xgetListValue();"); emit("void setListValue(java.util.List list);"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("java.util.List listValue();"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("java.util.List xlistValue();"); emit("/** @deprecated */"); + if (_useJava15) + emit("@Deprecated"); emit("void set(java.util.List list);"); } } @@ -1153,6 +1197,7 @@ emit(" * Gets array of all " + propdesc + "s"); emit(" * @deprecated"); emit(" */"); + emit("@Deprecated"); } else printJavaDoc("Gets array of all " + propdesc + "s"); @@ -1176,6 +1221,7 @@ emit(" * Gets (as xml) array of all " + propdesc + "s"); emit(" * @deprecated"); emit(" */"); + emit("@Deprecated"); } else printJavaDoc("Gets (as xml) array of all " + propdesc + "s"); @@ -2142,6 +2188,7 @@ emit(" * Gets array of all " + propdesc + "s"); emit(" * @deprecated"); emit(" */"); + emit("@Deprecated"); } else printJavaDoc("Gets array of all " + propdesc + "s"); @@ -2187,6 +2234,7 @@ emit(" * Gets array of all " + propdesc + "s"); emit(" * @deprecated"); emit(" */"); + emit("@Deprecated"); } else printJavaDoc("Gets (as xml) array of all " + propdesc + "s"); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: dev-h...@xmlbeans.apache.org