CVS Update: xmlpull-api-v1/src/java/api/org/xmlpull/v1
Aleksander Andrzej Slominski <[email protected]> Sun, 1 Feb 2004 14:17:34 -0500 (EST)
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Message-ID | <[email protected]> |
aslom 04/02/01 14:17:34
Modified: doc changes.html
src/java/api/org/xmlpull/v1 XmlPullParser.java
XmlSerializer.java
Log:
fixed style issue raised by Max Gilead related to unnecessary use of public modifier in interfaces (bug 174)
Revision Changes Path
1.53 +8 -5 xmlpull-api-v1/doc/changes.html
Index: changes.html
===================================================================
RCS file: /l/extreme/cvspub/xmlpull-api-v1/doc/changes.html,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -t -w -r1.52 -r1.53
--- changes.html 1 Feb 2004 16:57:31 -0000 1.52
+++ changes.html 1 Feb 2004 19:17:34 -0000 1.53
@@ -16,9 +16,12 @@
<h3>IN PROGRESS INTERIM RELEASE: </h3>
-<h3><a name="XMLPULL_1_1_3_*"></a>2004-01- (XMLPULL_1_1_3_*)</h3>
+<h3><a name="XMLPULL_1_1_3_*"></a>2004-02- (XMLPULL_1_1_3_*)</h3>
<ul>
+<li>2004-02-01: fixed style issue raised by Max Gilead related to unnecessary
+use of public modifier in interfaces (<a href="http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=174">bug
+174</a>)</li>
<li>2004-01-20: stronger serializer tests for case when char values < 32" (TestSerialize.java)</li>
<li>added <code>target="1.1"</code> to make sure that compiled code can work with JDK 1.1
(as described in <a href="http://ant.apache.org/manual/CoreTasks/javac.html">ANT Javac Task documentation</a>: (...)
@@ -65,11 +68,11 @@
<h3><a name="XMLPULL_1_1_2_1"></a>2003-02-26 (XMLPULL_1_1_2_1)</h3>
<ul>
-<li>minor release to make available the latest tests and documentation chnages
+<li>minor release to make available the latest tests and documentation changes
<li>added <a href="quick_write.html">quick introduction to using XmlSerializer</a>
-<li>added test to check that generating namespae prefix for attributes is allowed
+<li>added test to check that generating namespace prefix for attributes is allowed
(method getPrefix(uri, true) called after startTag() shoul dadd new prefix to
current start tag elements and not next start tag)
@@ -113,7 +116,7 @@
that extends SAX2 Driver to create a new copy of Attributes for each startElement()
so Attributes provided in startTag() will not change during parsing and can be kept
indefinitely (not that Attributes object is created for each startTag() and this
-is expensive both perfromance and memory wise and is not required by SAX2.
+is expensive both performance and memory wise and is not required by SAX2.
<li>more tests to check for CDATA end-of-line normalization
1.78 +54 -58 xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlPullParser.java
Index: XmlPullParser.java
===================================================================
RCS file: /l/extreme/cvspub/xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlPullParser.java,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -b -t -w -r1.77 -r1.78
--- XmlPullParser.java 5 Oct 2003 07:28:55 -0000 1.77
+++ XmlPullParser.java 1 Feb 2004 19:17:34 -0000 1.78
@@ -141,7 +141,7 @@
public interface XmlPullParser {
/** This constant represents the default namespace (empty string "") */
- public static final String NO_NAMESPACE = "";
+ String NO_NAMESPACE = "";
// ----------------------------------------------------------------------------
// EVENT TYPES as reported by next()
@@ -155,7 +155,7 @@
* @see #next
* @see #nextToken
*/
- public final static int START_DOCUMENT = 0;
+ int START_DOCUMENT = 0;
/**
* Logical end of the xml document. Returned from getEventType, next()
@@ -168,7 +168,7 @@
* @see #next
* @see #nextToken
*/
- public final static int END_DOCUMENT = 1;
+ int END_DOCUMENT = 1;
/**
* Returned from getEventType(),
@@ -191,7 +191,7 @@
* @see #getNamespace
* @see #FEATURE_PROCESS_NAMESPACES
*/
- public final static int START_TAG = 2;
+ int START_TAG = 2;
/**
* Returned from getEventType(), <a href="#next()">next()</a>, or
@@ -207,7 +207,7 @@
* @see #getNamespace
* @see #FEATURE_PROCESS_NAMESPACES
*/
- public final static int END_TAG = 3;
+ int END_TAG = 3;
/**
@@ -229,7 +229,7 @@
* @see #nextToken
* @see #getText
*/
- public final static int TEXT = 4;
+ int TEXT = 4;
// ----------------------------------------------------------------------------
// additional events exposed by lower level nextToken()
@@ -244,7 +244,7 @@
* @see #nextToken
* @see #getText
*/
- public final static int CDSECT = 5;
+ int CDSECT = 5;
/**
* An entity reference was just read;
@@ -259,7 +259,7 @@
* @see #nextToken
* @see #getText
*/
- public final static int ENTITY_REF = 6;
+ int ENTITY_REF = 6;
/**
* Ignorable whitespace was just read.
@@ -281,7 +281,7 @@
* @see #nextToken
* @see #getText
*/
- public static final int IGNORABLE_WHITESPACE = 7;
+ int IGNORABLE_WHITESPACE = 7;
/**
* An XML processing instruction declaration was just read. This
@@ -291,7 +291,7 @@
* @see #nextToken
* @see #getText
*/
- public static final int PROCESSING_INSTRUCTION = 8;
+ int PROCESSING_INSTRUCTION = 8;
/**
* An XML comment was just read. This event type is this token is
@@ -303,7 +303,7 @@
* @see #nextToken
* @see #getText
*/
- public static final int COMMENT = 9;
+ int COMMENT = 9;
/**
* An XML document type declaration was just read. This token is
@@ -314,7 +314,7 @@
* @see #nextToken
* @see #getText
*/
- public static final int DOCDECL = 10;
+ int DOCDECL = 10;
/**
* This array can be used to convert the event type integer constants
@@ -327,7 +327,7 @@
* applications may alter the array, although it is final, due
* to limitations of the Java language.
*/
- public static final String [] TYPES = {
+ String [] TYPES = {
"START_DOCUMENT",
"END_DOCUMENT",
"START_TAG",
@@ -354,7 +354,7 @@
* @see #getFeature
* @see #setFeature
*/
- public static final String FEATURE_PROCESS_NAMESPACES =
+ String FEATURE_PROCESS_NAMESPACES =
"http://xmlpull.org/v1/doc/features.html#process-namespaces";
/**
@@ -366,7 +366,7 @@
* @see #getFeature
* @see #setFeature
*/
- public static final String FEATURE_REPORT_NAMESPACE_ATTRIBUTES =
+ String FEATURE_REPORT_NAMESPACE_ATTRIBUTES =
"http://xmlpull.org/v1/doc/features.html#report-namespace-prefixes";
/**
@@ -387,7 +387,7 @@
* @see #getFeature
* @see #setFeature
*/
- public static final String FEATURE_PROCESS_DOCDECL =
+ String FEATURE_PROCESS_DOCDECL =
"http://xmlpull.org/v1/doc/features.html#process-docdecl";
/**
@@ -401,7 +401,7 @@
* @see #getFeature
* @see #setFeature
*/
- public static final String FEATURE_VALIDATION =
+ String FEATURE_VALIDATION =
"http://xmlpull.org/v1/doc/features.html#validation";
/**
@@ -417,7 +417,7 @@
* @exception XmlPullParserException If the feature is not supported or can not be set
* @exception IllegalArgumentException If string with the feature name is null
*/
- public void setFeature(String name,
+ void setFeature(String name,
boolean state) throws XmlPullParserException;
/**
@@ -430,7 +430,7 @@
* @exception IllegalArgumentException if string the feature name is null
*/
- public boolean getFeature(String name);
+ boolean getFeature(String name);
/**
* Set the value of a property.
@@ -440,7 +440,7 @@
* @exception XmlPullParserException If the property is not supported or can not be set
* @exception IllegalArgumentException If string with the property name is null
*/
- public void setProperty(String name,
+ void setProperty(String name,
Object value) throws XmlPullParserException;
/**
@@ -453,7 +453,7 @@
* @param name The name of property to be retrieved.
* @return The value of named property.
*/
- public Object getProperty(String name);
+ Object getProperty(String name);
/**
@@ -465,7 +465,7 @@
* allowing the parser to free internal resources
* such as parsing buffers.
*/
- public void setInput(Reader in) throws XmlPullParserException;
+ void setInput(Reader in) throws XmlPullParserException;
/**
@@ -486,7 +486,7 @@
*
* @param inputEncoding if not null it MUST be used as encoding for inputStream
*/
- public void setInput(InputStream inputStream, String inputEncoding)
+ void setInput(InputStream inputStream, String inputEncoding)
throws XmlPullParserException;
/**
@@ -501,7 +501,7 @@
* After first call to next if XML declaration was present this method
* will return encoding declared.
*/
- public String getInputEncoding();
+ String getInputEncoding();
/**
* Set new value for entity replacement text as defined in
@@ -534,7 +534,7 @@
* @see #FEATURE_PROCESS_DOCDECL
* @see #FEATURE_VALIDATION
*/
- public void defineEntityReplacementText( String entityName,
+ void defineEntityReplacementText( String entityName,
String replacementText ) throws XmlPullParserException;
/**
@@ -561,7 +561,7 @@
* @see #getNamespace()
* @see #getNamespace(String)
*/
- public int getNamespaceCount(int depth) throws XmlPullParserException;
+ int getNamespaceCount(int depth) throws XmlPullParserException;
/**
* Returns the namespace prefixe for the given position
@@ -573,7 +573,7 @@
* in the corresponding START_TAG are still accessible
* although they are no longer in scope.
*/
- public String getNamespacePrefix(int pos) throws XmlPullParserException;
+ String getNamespacePrefix(int pos) throws XmlPullParserException;
/**
* Returns the namespace URI for the given position in the
@@ -582,7 +582,7 @@
* <p><b>NOTE:</b> when parser is on END_TAG then namespace prefixes that were declared
* in corresponding START_TAG are still accessible even though they are not in scope
*/
- public String getNamespaceUri(int pos) throws XmlPullParserException;
+ String getNamespaceUri(int pos) throws XmlPullParserException;
/**
* Returns the URI corresponding to the given prefix,
@@ -616,7 +616,7 @@
* @see #getNamespacePrefix
* @see #getNamespaceUri
*/
- public String getNamespace (String prefix);
+ String getNamespace (String prefix);
// --------------------------------------------------------------------------
@@ -639,7 +639,7 @@
* <!-- outside --> 0
* </pre>
*/
- public int getDepth();
+ int getDepth();
/**
* Returns a short text describing the current parser state, including
@@ -648,8 +648,7 @@
* This method is especially useful to provide meaningful
* error messages and for debugging purposes.
*/
-
- public String getPositionDescription ();
+ String getPositionDescription ();
/**
@@ -659,7 +658,7 @@
*
* @return current line number or -1 if unknown.
*/
- public int getLineNumber();
+ int getLineNumber();
/**
* Returns the current column number, starting from 0.
@@ -668,7 +667,7 @@
*
* @return current column number or -1 if unknown.
*/
- public int getColumnNumber();
+ int getColumnNumber();
// --------------------------------------------------------------------------
@@ -689,8 +688,7 @@
* via nextToken only.
*
*/
-
- public boolean isWhitespace() throws XmlPullParserException;
+ boolean isWhitespace() throws XmlPullParserException;
/**
* Returns the text content of the current event as String.
@@ -710,7 +708,7 @@
* @see #next
* @see #nextToken
*/
- public String getText ();
+ String getText ();
/**
@@ -738,7 +736,7 @@
* @return char buffer that contains the text of the current event
* (null if the current event has no text associated).
*/
- public char[] getTextCharacters(int [] holderForStartAndLength);
+ char[] getTextCharacters(int [] holderForStartAndLength);
// --------------------------------------------------------------------------
// START_TAG / END_TAG shared methods
@@ -751,7 +749,7 @@
* The current event must be START_TAG or END_TAG; otherwise,
* null is returned.
*/
- public String getNamespace ();
+ String getNamespace ();
/**
* For START_TAG or END_TAG events, the (local) name of the current
@@ -765,7 +763,7 @@
* you will need to add the prefix and a colon to localName..
*
*/
- public String getName();
+ String getName();
/**
* Returns the prefix of the current element.
@@ -774,8 +772,7 @@
* If namespaces are not enabled, or the current event
* is not START_TAG or END_TAG, null is returned.
*/
-
- public String getPrefix();
+ String getPrefix();
/**
* Returns true if the current event is START_TAG and the tag
@@ -784,7 +781,7 @@
* <p><b>NOTE:</b> if the parser is not on START_TAG, an exception
* will be thrown.
*/
- public boolean isEmptyElementTag() throws XmlPullParserException;
+ boolean isEmptyElementTag() throws XmlPullParserException;
// --------------------------------------------------------------------------
// START_TAG Attributes retrieval methods
@@ -798,7 +795,7 @@
* @see #getAttributePrefix
* @see #getAttributeValue
*/
- public int getAttributeCount();
+ int getAttributeCount();
/**
* Returns the namespace URI of the attribute
@@ -823,7 +820,7 @@
* empty string ("") is returned if namesapces processing is not enabled or
* namespaces processing is enabled but attribute has no namespace (it has no prefix).
*/
- public String getAttributeNamespace (int index);
+ String getAttributeNamespace (int index);
/**
* Returns the local name of the specified attribute
@@ -834,7 +831,7 @@
* @param zero based index of attribute
* @return attribute name (null is never returned)
*/
- public String getAttributeName (int index);
+ String getAttributeName (int index);
/**
* Returns the prefix of the specified attribute
@@ -846,7 +843,7 @@
* @param zero based index of attribute
* @return attribute prefix or null if namespaces processing is not enabled.
*/
- public String getAttributePrefix(int index);
+ String getAttributePrefix(int index);
/**
* Returns the type of the specified attribute
@@ -855,7 +852,7 @@
* @param zero based index of attribute
* @return attribute type (null is never returned)
*/
- public String getAttributeType(int index);
+ String getAttributeType(int index);
/**
* Returns if the specified attribute was not in input was declared in XML.
@@ -865,7 +862,7 @@
* @param zero based index of attribute
* @return false if attribute was in input
*/
- public boolean isAttributeDefault(int index);
+ boolean isAttributeDefault(int index);
/**
* Returns the given attributes value.
@@ -882,7 +879,7 @@
* @param zero based index of attribute
* @return value of attribute (null is never returned)
*/
- public String getAttributeValue(int index);
+ String getAttributeValue(int index);
/**
* Returns the attributes value identified by namespace URI and namespace localName.
@@ -900,7 +897,7 @@
* @param name If namespaces enabled local name of attribute otherwise just attribute name
* @return value of attribute or null if attribute with given name does not exist
*/
- public String getAttributeValue(String namespace,
+ String getAttributeValue(String namespace,
String name);
// --------------------------------------------------------------------------
@@ -912,7 +909,7 @@
* @see #next()
* @see #nextToken()
*/
- public int getEventType()
+ int getEventType()
throws XmlPullParserException;
/**
@@ -934,7 +931,7 @@
* @see #END_DOCUMENT
*/
- public int next()
+ int next()
throws XmlPullParserException, IOException;
@@ -1026,8 +1023,7 @@
* @see #ENTITY_REF
* @see #IGNORABLE_WHITESPACE
*/
-
- public int nextToken()
+ int nextToken()
throws XmlPullParserException, IOException;
//-----------------------------------------------------------------------------
@@ -1049,7 +1045,7 @@
* throw new XmlPullParserException( "expected "+ TYPES[ type ]+getPositionDescription());
* </pre>
*/
- public void require(int type, String namespace, String name)
+ void require(int type, String namespace, String name)
throws XmlPullParserException, IOException;
/**
@@ -1095,7 +1091,7 @@
* }
* </pre>
*/
- public String nextText() throws XmlPullParserException, IOException;
+ String nextText() throws XmlPullParserException, IOException;
/**
* Call next() and return event if it is START_TAG or END_TAG
@@ -1114,7 +1110,7 @@
* return eventType;
* </pre>
*/
- public int nextTag() throws XmlPullParserException, IOException;
+ int nextTag() throws XmlPullParserException, IOException;
}
1.16 +28 -28 xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlSerializer.java
Index: XmlSerializer.java
===================================================================
RCS file: /l/extreme/cvspub/xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlSerializer.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -t -w -r1.15 -r1.16
--- XmlSerializer.java 1 Feb 2004 18:49:31 -0000 1.15
+++ XmlSerializer.java 1 Feb 2004 19:17:34 -0000 1.16
@@ -45,7 +45,7 @@
*
* @exception IllegalStateException If the feature is not supported or can not be set
*/
- public void setFeature(String name,
+ void setFeature(String name,
boolean state)
throws IllegalArgumentException, IllegalStateException;
@@ -58,7 +58,7 @@
* @return The value of named feature.
* @exception IllegalArgumentException if feature string is null
*/
- public boolean getFeature(String name);
+ boolean getFeature(String name);
/**
@@ -73,7 +73,7 @@
*
* @exception IllegalStateException if the property is not supported or can not be set
*/
- public void setProperty(String name,
+ void setProperty(String name,
Object value)
throws IllegalArgumentException, IllegalStateException;
@@ -86,19 +86,19 @@
* @param name The name of property to be retrieved.
* @return The value of named property.
*/
- public Object getProperty(String name);
+ Object getProperty(String name);
/**
* Set to use binary output stream with given encoding.
*/
- public void setOutput (OutputStream os, String encoding)
+ void setOutput (OutputStream os, String encoding)
throws IOException, IllegalArgumentException, IllegalStateException;
/**
* Set the output to the given writer.
* <p><b>WARNING</b> no information about encoding is available!
*/
- public void setOutput (Writer writer)
+ void setOutput (Writer writer)
throws IOException, IllegalArgumentException, IllegalStateException;
/**
@@ -106,7 +106,7 @@
* and standalone flag (if standalone not null)
* This method can only be called just after setOutput.
*/
- public void startDocument (String encoding, Boolean standalone)
+ void startDocument (String encoding, Boolean standalone)
throws IOException, IllegalArgumentException, IllegalStateException;
/**
@@ -114,7 +114,7 @@
* will be flushed. After calling this method no more output can be
* serialized until next call to setOutput()
*/
- public void endDocument ()
+ void endDocument ()
throws IOException, IllegalArgumentException, IllegalStateException;
/**
@@ -136,7 +136,7 @@
* @param prefix must be not null (or IllegalArgumentException is thrown)
* @param namespace must be not null
*/
- public void setPrefix (String prefix, String namespace)
+ void setPrefix (String prefix, String namespace)
throws IOException, IllegalArgumentException, IllegalStateException;
/**
@@ -151,7 +151,7 @@
* will have values as defined
* <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML specification</a>
*/
- public String getPrefix (String namespace, boolean generatePrefix)
+ String getPrefix (String namespace, boolean generatePrefix)
throws IllegalArgumentException;
/**
@@ -171,7 +171,7 @@
* <!-- outside --> 0
* </pre>
*/
- public int getDepth();
+ int getDepth();
/**
* Returns the namespace URI of the current element as set by startTag().
@@ -183,7 +183,7 @@
*
* @return namespace set by startTag() that is currently in scope
*/
- public String getNamespace ();
+ String getNamespace ();
/**
* Returns the name of the current element as set by startTag().
@@ -192,7 +192,7 @@
*
* @return namespace set by startTag() that is currently in scope
*/
- public String getName();
+ String getName();
/**
* Writes a start tag with the given namespace and name.
@@ -206,7 +206,7 @@
* or throw IllegalStateException if default namespace is already bound
* to non-empty string.
*/
- public XmlSerializer startTag (String namespace, String name)
+ XmlSerializer startTag (String namespace, String name)
throws IOException, IllegalArgumentException, IllegalStateException;
/**
@@ -216,7 +216,7 @@
* If namespace is null or empty string
* no namespace prefix is printed but just name.
*/
- public XmlSerializer attribute (String namespace, String name, String value)
+ XmlSerializer attribute (String namespace, String name, String value)
throws IOException, IllegalArgumentException, IllegalStateException;
/**
@@ -227,7 +227,7 @@
* If namespace is empty string then serialzier will make sure that
* default empty namespace is declared (in XML 1.0 xmlns='').
*/
- public XmlSerializer endTag (String namespace, String name)
+ XmlSerializer endTag (String namespace, String name)
throws IOException, IllegalArgumentException, IllegalStateException;
@@ -246,7 +246,7 @@
// * or throw IllegalStateException if default namespace is already bound
// * to non-empty string.
// */
- // public XmlSerializer startTag (String prefix, String namespace, String name)
+ // XmlSerializer startTag (String prefix, String namespace, String name)
// throws IOException, IllegalArgumentException, IllegalStateException;
//
// /**
@@ -265,7 +265,7 @@
// * or throw IllegalStateException if default namespace is already bound
// * to non-empty string.
// */
- // public XmlSerializer attribute (String prefix, String namespace, String name, String value)
+ // XmlSerializer attribute (String prefix, String namespace, String name, String value)
// throws IOException, IllegalArgumentException, IllegalStateException;
//
// /**
@@ -281,32 +281,32 @@
// * very difficult to find...</p>
// */
// ALEK: This is really optional as prefix in end tag MUST correspond to start tag but good for error checking
- // public XmlSerializer endTag (String prefix, String namespace, String name)
+ // XmlSerializer endTag (String prefix, String namespace, String name)
// throws IOException, IllegalArgumentException, IllegalStateException;
/**
* Writes text, where special XML chars are escaped automatically
*/
- public XmlSerializer text (String text)
+ XmlSerializer text (String text)
throws IOException, IllegalArgumentException, IllegalStateException;
/**
* Writes text, where special XML chars are escaped automatically
*/
- public XmlSerializer text (char [] buf, int start, int len)
+ XmlSerializer text (char [] buf, int start, int len)
throws IOException, IllegalArgumentException, IllegalStateException;
- public void cdsect (String text)
+ void cdsect (String text)
throws IOException, IllegalArgumentException, IllegalStateException;
- public void entityRef (String text) throws IOException,
+ void entityRef (String text) throws IOException,
IllegalArgumentException, IllegalStateException;
- public void processingInstruction (String text)
+ void processingInstruction (String text)
throws IOException, IllegalArgumentException, IllegalStateException;
- public void comment (String text)
+ void comment (String text)
throws IOException, IllegalArgumentException, IllegalStateException;
- public void docdecl (String text)
+ void docdecl (String text)
throws IOException, IllegalArgumentException, IllegalStateException;
- public void ignorableWhitespace (String text)
+ void ignorableWhitespace (String text)
throws IOException, IllegalArgumentException, IllegalStateException;
/**
@@ -319,7 +319,7 @@
* call method text() with empty string (text("")).
*
*/
- public void flush ()
+ void flush ()
throws IOException;
}
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/xmlpull-dev/
To unsubscribe from this group, send an email to:
[email protected]
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/