1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 18:29:45 +02:00

Javadoc changes for Java 11 compatibility

This commit is contained in:
Florian Schmaus 2019-07-19 18:10:36 +02:00
parent 8fa90113c9
commit 91ec6cc955
58 changed files with 177 additions and 177 deletions

View file

@ -286,7 +286,7 @@ public abstract class ConnectionConfiguration {
}
/**
* Returns the keystore type, or <tt>null</tt> if it's not set.
* Returns the keystore type, or <code>null</code> if it's not set.
*
* @return the keystore type.
*/
@ -902,7 +902,7 @@ public abstract class ConnectionConfiguration {
* Sets if an initial available presence will be sent to the server. By default
* an available presence will be sent to the server indicating that this presence
* is not online and available to receive messages. If you want to log in without
* being 'noticed' then pass a <tt>false</tt> value.
* being 'noticed' then pass a <code>false</code> value.
*
* @param sendPresence true if an initial available presence will be sent while logging in.
* @return a reference to this builder.

View file

@ -84,7 +84,7 @@ public final class SmackConfiguration {
* <li> Interpreted Packets -- shows XML packets from the server as parsed by Smack.
* </ul>
* Debugging can be enabled by setting this field to true, or by setting the Java system
* property <tt>smack.debugEnabled</tt> to true. The system property can be set on the
* property <code>smack.debugEnabled</code> to true. The system property can be set on the
* command line such as "java SomeApp -Dsmack.debugEnabled=true".
*/
public static boolean DEBUG = false;

View file

@ -63,7 +63,7 @@ public final class StanzaCollector implements AutoCloseable {
private Exception connectionException;
/**
* Creates a new stanza collector. If the stanza filter is <tt>null</tt>, then
* Creates a new stanza collector. If the stanza filter is <code>null</code>, then
* all packets will match this collector.
*
* @param connection the connection the collector is tied to.
@ -110,11 +110,11 @@ public final class StanzaCollector implements AutoCloseable {
/**
* Polls to see if a stanza is currently available and returns it, or
* immediately returns <tt>null</tt> if no packets are currently in the
* immediately returns <code>null</code> if no packets are currently in the
* result queue.
*
* @param <P> type of the result stanza.
* @return the next stanza result, or <tt>null</tt> if there are no more
* @return the next stanza result, or <code>null</code> if there are no more
* results.
*/
@SuppressWarnings("unchecked")
@ -124,7 +124,7 @@ public final class StanzaCollector implements AutoCloseable {
/**
* Polls to see if a stanza is currently available and returns it, or
* immediately returns <tt>null</tt> if no packets are currently in the
* immediately returns <code>null</code> if no packets are currently in the
* result queue.
* <p>
* Throws an XMPPErrorException in case the polled stanzas did contain an XMPPError.
@ -183,8 +183,8 @@ public final class StanzaCollector implements AutoCloseable {
/**
* Returns the next available stanza. The method call will block (not return) until a stanza is available or the
* <tt>timeout</tt> has elapsed or if the connection was terminated because of an error. If the timeout elapses without a
* result or if there was an connection error, <tt>null</tt> will be returned.
* <code>timeout</code> has elapsed or if the connection was terminated because of an error. If the timeout elapses without a
* result or if there was an connection error, <code>null</code> will be returned.
*
* @param <P> type of the result stanza.
* @param timeout the timeout in milliseconds.
@ -230,7 +230,7 @@ public final class StanzaCollector implements AutoCloseable {
/**
* Returns the next available stanza. The method call will block until a stanza is
* available or the <tt>timeout</tt> has elapsed. This method does also cancel the
* available or the <code>timeout</code> has elapsed. This method does also cancel the
* collector in every case.
* <p>
* Three things can happen when waiting for an response:

View file

@ -123,7 +123,7 @@ public interface XMPPConnection {
/**
* Returns the full XMPP address of the user that is logged in to the connection or
* <tt>null</tt> if not logged in yet. An XMPP address is in the form
* <code>null</code> if not logged in yet. An XMPP address is in the form
* username@server/resource.
*
* @return the full XMPP address of the user logged in.
@ -132,9 +132,9 @@ public interface XMPPConnection {
/**
* Returns the stream ID for this connection, which is the value set by the server
* when opening an XMPP stream. This value will be <tt>null</tt> if not connected to the server.
* when opening an XMPP stream. This value will be <code>null</code> if not connected to the server.
*
* @return the ID of this connection returned from the XMPP server or <tt>null</tt> if
* @return the ID of this connection returned from the XMPP server or <code>null</code> if
* not connected to the server.
* @see <a href="http://xmpp.org/rfcs/rfc6120.html#streams-attr-id">RFC 6120 § 4.7.3. id</a>
*/
@ -471,7 +471,7 @@ public interface XMPPConnection {
/**
* Get the connection counter of this XMPPConnection instance. Those can be used as ID to
* identify the connection, but beware that the ID may not be unique if you create more then
* <tt>2*Integer.MAX_VALUE</tt> instances as the counter could wrap.
* <code>2*Integer.MAX_VALUE</code> instances as the counter could wrap.
*
* @return the connection counter of this XMPPConnection
*/

View file

@ -29,7 +29,7 @@ import org.jivesoftware.smack.util.ExceptionUtil;
* <p>
* It is possible to not only print the raw sent and received stanzas but also the interpreted
* packets by Smack. By default interpreted packets won't be printed. To enable this feature
* just change the <tt>printInterpreted</tt> static variable to <tt>true</tt>.
* just change the <code>printInterpreted</code> static variable to <code>true</code>.
* </p>
*
* @author Gaston Dombiak

View file

@ -28,7 +28,7 @@ import org.jivesoftware.smack.XMPPConnection;
* <p>
* It is possible to not only print the raw sent and received stanzas but also the interpreted
* packets by Smack. By default interpreted packets won't be printed. To enable this feature
* just change the <tt>printInterpreted</tt> static variable to <tt>true</tt>.
* just change the <code>printInterpreted</code> static variable to <code>true</code>.
* </p>
*
* @author Gaston Dombiak

View file

@ -25,9 +25,9 @@ import org.jivesoftware.smack.packet.Stanza;
* Filters for packets of a particular type. The type is given as a Class object, so
* example types would:
* <ul>
* <li><tt>Message.class</tt>
* <li><tt>IQ.class</tt>
* <li><tt>Presence.class</tt>
* <li><code>Message.class</code>
* <li><code>IQ.class</code>
* <li><code>Presence.class</code>
* </ul>
*
* @author Matt Tucker
@ -43,7 +43,7 @@ public class PacketTypeFilter implements StanzaFilter {
/**
* Creates a new stanza type filter that will filter for packets that are the
* same type as <tt>packetType</tt>.
* same type as <code>packetType</code>.
*
* @param packetType the Class type.
*/

View file

@ -57,7 +57,7 @@ public interface StanzaFilter {
* Tests whether or not the specified stanza should pass the filter.
*
* @param stanza the stanza to test.
* @return true if and only if <tt>stanza</tt> passes the filter.
* @return true if and only if <code>stanza</code> passes the filter.
*/
boolean accept(Stanza stanza);
}

View file

@ -26,9 +26,9 @@ import org.jivesoftware.smack.packet.Stanza;
* Filters for Stanzas of a particular type. The type is given as a Class object, so
* example types would:
* <ul>
* <li><tt>Message.class</tt>
* <li><tt>IQ.class</tt>
* <li><tt>Presence.class</tt>
* <li><code>Message.class</code>
* <li><code>IQ.class</code>
* <li><code>Presence.class</code>
* </ul>
*
* @author Matt Tucker
@ -43,7 +43,7 @@ public final class StanzaTypeFilter implements StanzaFilter {
/**
* Creates a new stanza type filter that will filter for packets that are the
* same type as <tt>packetType</tt>.
* same type as <code>packetType</code>.
*
* @param packetType the Class type.
*/

View file

@ -93,12 +93,12 @@ public class AbstractError {
/**
* Returns the first stanza extension that matches the specified element name and
* namespace, or <tt>null</tt> if it doesn't exist.
* namespace, or <code>null</code> if it doesn't exist.
*
* @param elementName the XML element name of the stanza extension.
* @param namespace the XML element namespace of the stanza extension.
* @param <PE> type of the ExtensionElement.
* @return the extension, or <tt>null</tt> if it doesn't exist.
* @return the extension, or <code>null</code> if it doesn't exist.
*/
public <PE extends ExtensionElement> PE getExtension(String elementName, String namespace) {
return PacketUtil.extensionElementFrom(extensions, elementName, namespace);

View file

@ -438,9 +438,9 @@ public final class Message extends Stanza implements TypedCloneable<Message> {
/**
* Returns the thread id of the message, which is a unique identifier for a sequence
* of "chat" messages. If no thread id is set, <tt>null</tt> will be returned.
* of "chat" messages. If no thread id is set, <code>null</code> will be returned.
*
* @return the thread id of the message, or <tt>null</tt> if it doesn't exist.
* @return the thread id of the message, or <code>null</code> if it doesn't exist.
*/
public String getThread() {
return thread;

View file

@ -63,11 +63,11 @@ public interface Packet extends TopLevelStreamElement {
void setPacketID(String packetID);
/**
* Returns who the stanza is being sent "to", or <tt>null</tt> if
* Returns who the stanza is being sent "to", or <code>null</code> if
* the value is not set. The XMPP protocol often makes the "to"
* attribute optional, so it does not always need to be set.<p>
*
* @return who the stanza is being sent to, or <tt>null</tt> if the
* @return who the stanza is being sent to, or <code>null</code> if the
* value has not been set.
*/
String getTo();
@ -81,11 +81,11 @@ public interface Packet extends TopLevelStreamElement {
void setTo(String to);
/**
* Returns who the stanza is being sent "from" or <tt>null</tt> if
* Returns who the stanza is being sent "from" or <code>null</code> if
* the value is not set. The XMPP protocol often makes the "from"
* attribute optional, so it does not always need to be set.<p>
*
* @return who the stanza is being sent from, or <tt>null</tt> if the
* @return who the stanza is being sent from, or <code>null</code> if the
* value has not been set.
*/
String getFrom();
@ -100,10 +100,10 @@ public interface Packet extends TopLevelStreamElement {
void setFrom(String from);
/**
* Returns the error associated with this packet, or <tt>null</tt> if there are
* Returns the error associated with this packet, or <code>null</code> if there are
* no errors.
*
* @return the error sub-packet or <tt>null</tt> if there isn't an error.
* @return the error sub-packet or <code>null</code> if there isn't an error.
*/
StanzaError getError();
/**
@ -160,7 +160,7 @@ public interface Packet extends TopLevelStreamElement {
/**
* Returns the first stanza extension that matches the specified element name and
* namespace, or <tt>null</tt> if it doesn't exist. If the provided elementName is null,
* namespace, or <code>null</code> if it doesn't exist. If the provided elementName is null,
* only the namespace is matched. Stanza extensions are
* are arbitrary XML sub-documents in standard XMPP packets. By default, a
* DefaultPacketExtension instance will be returned for each extension. However,
@ -172,7 +172,7 @@ public interface Packet extends TopLevelStreamElement {
* @param elementName the XML element name of the stanza extension. (May be null)
* @param namespace the XML element namespace of the stanza extension.
* @param <PE> type of the ExtensionElement.
* @return the extension, or <tt>null</tt> if it doesn't exist.
* @return the extension, or <code>null</code> if it doesn't exist.
*/
<PE extends ExtensionElement> PE getExtension(String elementName, String namespace);
/**

View file

@ -138,7 +138,7 @@ public final class Presence extends Stanza implements TypedCloneable<Presence> {
* Returns true if the {@link Type presence type} is available (online) and
* false if the user is unavailable (offline), or if this is a presence packet
* involved in a subscription operation. This is a convenience method
* equivalent to <tt>getType() == Presence.Type.available</tt>. Note that even
* equivalent to <code>getType() == Presence.Type.available</code>. Note that even
* when the user is available, their presence mode may be {@link Mode#away away},
* {@link Mode#xa extended away} or {@link Mode#dnd do not disturb}. Use
* {@link #isAway()} to determine if the user is away.
@ -155,7 +155,7 @@ public final class Presence extends Stanza implements TypedCloneable<Presence> {
* {@link Mode#dnd do not disturb}. False will be returned when the type or mode
* is any other value, including when the presence type is unavailable (offline).
* This is a convenience method equivalent to
* <tt>type == Type.available &amp;&amp; (mode == Mode.away || mode == Mode.xa || mode == Mode.dnd)</tt>.
* <code>type == Type.available &amp;&amp; (mode == Mode.away || mode == Mode.xa || mode == Mode.dnd)</code>.
*
* @return true if the presence type is available and the presence mode is away, xa, or dnd.
*/
@ -182,7 +182,7 @@ public final class Presence extends Stanza implements TypedCloneable<Presence> {
}
/**
* Returns the status message of the presence update, or <tt>null</tt> if there
* Returns the status message of the presence update, or <code>null</code> if there
* is not a status. The status is free-form text describing a user's presence
* (i.e., "gone to lunch").
*

View file

@ -164,11 +164,11 @@ public abstract class Stanza implements TopLevelStreamElement {
}
/**
* Returns who the stanza is being sent "to", or <tt>null</tt> if
* Returns who the stanza is being sent "to", or <code>null</code> if
* the value is not set. The XMPP protocol often makes the "to"
* attribute optional, so it does not always need to be set.<p>
*
* @return who the stanza is being sent to, or <tt>null</tt> if the
* @return who the stanza is being sent to, or <code>null</code> if the
* value has not been set.
*/
public Jid getTo() {
@ -206,11 +206,11 @@ public abstract class Stanza implements TopLevelStreamElement {
}
/**
* Returns who the stanza is being sent "from" or <tt>null</tt> if
* Returns who the stanza is being sent "from" or <code>null</code> if
* the value is not set. The XMPP protocol often makes the "from"
* attribute optional, so it does not always need to be set.<p>
*
* @return who the stanza is being sent from, or <tt>null</tt> if the
* @return who the stanza is being sent from, or <code>null</code> if the
* value has not been set.
*/
public Jid getFrom() {
@ -250,10 +250,10 @@ public abstract class Stanza implements TopLevelStreamElement {
}
/**
* Returns the error associated with this packet, or <tt>null</tt> if there are
* Returns the error associated with this packet, or <code>null</code> if there are
* no errors.
*
* @return the error sub-packet or <tt>null</tt> if there isn't an error.
* @return the error sub-packet or <code>null</code> if there isn't an error.
*/
public StanzaError getError() {
return error;
@ -346,14 +346,14 @@ public abstract class Stanza implements TopLevelStreamElement {
/**
* Returns the first extension that matches the specified element name and
* namespace, or <tt>null</tt> if it doesn't exist. If the provided elementName is null,
* namespace, or <code>null</code> if it doesn't exist. If the provided elementName is null,
* only the namespace is matched. Extensions are
* are arbitrary XML elements in standard XMPP stanzas.
*
* @param elementName the XML element name of the extension. (May be null)
* @param namespace the XML element namespace of the extension.
* @param <PE> type of the ExtensionElement.
* @return the extension, or <tt>null</tt> if it doesn't exist.
* @return the extension, or <code>null</code> if it doesn't exist.
*/
@SuppressWarnings("unchecked")
public <PE extends ExtensionElement> PE getExtension(String elementName, String namespace) {

View file

@ -60,8 +60,8 @@ import org.jivesoftware.smack.xml.XmlPullParserException;
* &lt;/message&gt;
*
* I would have a classes
* <tt>ItemsProvider</tt> extends {@link EmbeddedExtensionProvider}
* <tt>ItemProvider</tt> extends {@link EmbeddedExtensionProvider}
* <code>ItemsProvider</code> extends {@link EmbeddedExtensionProvider}
* <code>ItemProvider</code> extends {@link EmbeddedExtensionProvider}
* and
* AtomProvider extends {@link ExtensionElementProvider}
*

View file

@ -94,7 +94,7 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
protected SSLSession sslSession;
/**
* Builds and sends the <tt>auth</tt> stanza to the server. Note that this method of
* Builds and sends the <code>auth</code> stanza to the server. Note that this method of
* authentication is not recommended, since it is very inflexible. Use
* {@link #authenticate(String, DomainBareJid, CallbackHandler, EntityBareJid, SSLSession)} whenever possible.
*
@ -161,7 +161,7 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
}
/**
* Builds and sends the <tt>auth</tt> stanza to the server. The callback handler will handle
* Builds and sends the <code>auth</code> stanza to the server. The callback handler will handle
* any additional information, such as the authentication ID or realm, if it is needed.
*
* @param host the hostname where the user account resides.