From e4c193440e299b08c0e2c7dbdfe4ddd94be7c76b Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Sat, 5 Oct 2013 21:42:19 +0200 Subject: [PATCH] Correct all JavaDoc problems. --- .../com/comphenix/protocol/CommandBase.java | 4 ++-- .../com/comphenix/protocol/CommandFilter.java | 4 ++-- .../protocol/async/AsyncFilterManager.java | 1 - .../protocol/events/NetworkMarker.java | 2 +- .../packet/PacketInjectorBuilder.java | 4 ++-- .../player/InjectedServerConnection.java | 2 +- .../player/PlayerInjectionHandler.java | 2 -- .../injector/player/PlayerInjector.java | 4 +--- .../player/PlayerInjectorBuilder.java | 2 +- .../injector/server/BukkitSocketInjector.java | 2 +- .../injector/server/SocketInjector.java | 2 +- .../server/TemporaryPlayerFactory.java | 1 - .../com/comphenix/protocol/package-info.java | 4 ++-- .../protocol/reflect/MethodInfo.java | 14 +++++++---- .../protocol/reflect/PrettyPrinter.java | 2 +- .../reflect/fuzzy/AbstractFuzzyMatcher.java | 2 +- .../reflect/fuzzy/FuzzyClassContract.java | 4 ++-- .../reflect/instances/DefaultInstances.java | 4 ++-- .../protocol/timing/TimedListenerManager.java | 6 ++--- .../protocol/utility/MinecraftVersion.java | 2 +- .../protocol/utility/SafeCacheBuilder.java | 23 +++++++++---------- .../protocol/utility/StreamSerializer.java | 11 ++++----- .../protocol/wrappers/WrappedAttribute.java | 4 +--- .../wrappers/WrappedAttributeModifier.java | 2 +- 24 files changed, 51 insertions(+), 57 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandBase.java b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandBase.java index e7208c18..59d20f47 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandBase.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandBase.java @@ -134,8 +134,8 @@ abstract class CommandBase implements CommandExecutor { /** * Main implementation of this command. * @param sender - command sender. - * @param args - * @return + * @param args - input arguments. + * @return TRUE if the command was successfully handled, FALSE otherwise. */ protected abstract boolean handleCommand(CommandSender sender, String[] args); } diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandFilter.java b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandFilter.java index 09be6900..0147d8be 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandFilter.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandFilter.java @@ -49,7 +49,7 @@ public class CommandFilter extends CommandBase { * @param event - the packet event. * @param filter - the filter that failed. * @param ex - the failure. - * @returns TRUE to keep processing this filter, FALSE to remove it. + * @return TRUE to keep processing this filter, FALSE to remove it. */ public boolean handle(PacketEvent event, Filter filter, Exception ex); } @@ -77,7 +77,7 @@ public class CommandFilter extends CommandBase { * Construct a new immutable filter. * @param name - the unique name of the filter. * @param predicate - the JavaScript predicate that will be used to filter packet events. - * @param ranges - a list of valid packet ID ranges that this filter applies to. + * @param packets - a list of valid packet ID that this filter applies to. */ public Filter(String name, String predicate, Set packets) { this.name = name; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/async/AsyncFilterManager.java b/ProtocolLib/src/main/java/com/comphenix/protocol/async/AsyncFilterManager.java index 6d8c1345..a1254163 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/async/AsyncFilterManager.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/async/AsyncFilterManager.java @@ -81,7 +81,6 @@ public class AsyncFilterManager implements AsynchronousManager { * Internal method. Retrieve the global asynchronous manager from the protocol manager instead. * @param reporter - desired error reporter. * @param scheduler - task scheduler. - * @param manager - protocol manager. */ public AsyncFilterManager(ErrorReporter reporter, BukkitScheduler scheduler) { // Initialize timeout listeners diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/events/NetworkMarker.java b/ProtocolLib/src/main/java/com/comphenix/protocol/events/NetworkMarker.java index c1b08974..e47ece45 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/events/NetworkMarker.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/events/NetworkMarker.java @@ -83,7 +83,7 @@ public class NetworkMarker { * Retrieve the serialized packet data as an input stream. *

* The data is exactly the same as in {@link #getInputBuffer()}. - * @see {@link #getInputBuffer()} + * @see #getInputBuffer() * @return The incoming serialized packet data as a stream, or NULL if the packet was transmitted locally. */ public DataInputStream getInputStream() { diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/PacketInjectorBuilder.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/PacketInjectorBuilder.java index a844cd09..fb6def6a 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/PacketInjectorBuilder.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/PacketInjectorBuilder.java @@ -68,8 +68,8 @@ public class PacketInjectorBuilder { } /** - * The packet stream invoker. - * @param invoker - the invoker. + * Set the player injection. + * @param playerInjection - the injection. * @return This builder, for chaining. */ @Nonnull diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/InjectedServerConnection.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/InjectedServerConnection.java index 7ae571c2..935bbb19 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/InjectedServerConnection.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/InjectedServerConnection.java @@ -198,7 +198,7 @@ public class InjectedServerConnection { * Retrieve the listener thread object, or NULL the server isn't using this socket implementation. * @return The listener thread, or NULL. * @throws IllegalAccessException Cannot access field. - * @hrows RuntimeException Unexpected class structure - the field doesn't exist. + * @throws RuntimeException Unexpected class structure - the field doesn't exist. */ public Object getListenerThread() throws RuntimeException, IllegalAccessException { initialize(); diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java index e58d4c30..16e0eff0 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectionHandler.java @@ -141,7 +141,6 @@ public interface PlayerInjectionHandler { /** * Determine if the given listeners are valid. - * @param version - the current Minecraft version, or NULL if unknown. * @param listeners - listeners to check. */ public abstract void checkListener(Set listeners); @@ -150,7 +149,6 @@ public interface PlayerInjectionHandler { * Determine if a listener is valid or not. *

* If not, a warning will be printed to the console. - * @param version - the current Minecraft version, or NULL if unknown. * @param listener - listener to check. */ public abstract void checkListener(PacketListener listener); diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjector.java index 113ac512..c0019e2e 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjector.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjector.java @@ -515,7 +515,7 @@ public abstract class PlayerInjector implements SocketInjector { * @param packet - server packet to send. * @param marker - the network marker. * @param filtered - whether or not the packet will be filtered by our listeners. - * @param InvocationTargetException If an error occured when sending the packet. + * @throws InvocationTargetException If an error occured when sending the packet. */ @Override public abstract void sendServerPacket(Object packet, NetworkMarker marker, boolean filtered) throws InvocationTargetException; @@ -570,8 +570,6 @@ public abstract class PlayerInjector implements SocketInjector { * Invoked before a new listener is registered. *

* The player injector should only return a non-null value if some or all of the packet IDs are unsupported. - * @param version - * * @param version - the current Minecraft version, or NULL if unknown. * @param listener - the listener that is about to be registered. * @return A error message with the unsupported packet IDs, or NULL if this listener is valid. diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectorBuilder.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectorBuilder.java index 77ccbf5f..3a5ec97b 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectorBuilder.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/player/PlayerInjectorBuilder.java @@ -111,7 +111,7 @@ public class PlayerInjectorBuilder { /** * Set the current Minecraft version. - * @param server - the current Minecraft version, or NULL if unknown. + * @param version - the current Minecraft version, or NULL if unknown. * @return This builder, for chaining. */ public PlayerInjectorBuilder version(MinecraftVersion version) { diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/BukkitSocketInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/BukkitSocketInjector.java index 0d45d6cb..b9493068 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/BukkitSocketInjector.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/BukkitSocketInjector.java @@ -19,7 +19,7 @@ public class BukkitSocketInjector implements SocketInjector { /** * Represents a temporary socket injector. - * @param temporaryPlayer - a temporary player. + * @param player - a temporary player. */ public BukkitSocketInjector(Player player) { if (player == null) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/SocketInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/SocketInjector.java index e4d6dc49..38dfaa5c 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/SocketInjector.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/SocketInjector.java @@ -40,7 +40,7 @@ public interface SocketInjector { * @param packet - server packet to send. * @param marker - the network marker. * @param filtered - whether or not the packet will be filtered by our listeners. - * @param InvocationTargetException If an error occured when sending the packet. + * @throws InvocationTargetException If an error occured when sending the packet. */ public abstract void sendServerPacket(Object packet, NetworkMarker marker, boolean filtered) throws InvocationTargetException; diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/TemporaryPlayerFactory.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/TemporaryPlayerFactory.java index 83c6f00b..968efbf3 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/TemporaryPlayerFactory.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/server/TemporaryPlayerFactory.java @@ -84,7 +84,6 @@ public class TemporaryPlayerFactory { *

* Note that a temporary player has not yet been assigned a name, and thus cannot be * uniquely identified. Use the address instead. - * @param injector - the player injector used. * @param server - the current server. * @return A temporary player instance. */ diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/package-info.java b/ProtocolLib/src/main/java/com/comphenix/protocol/package-info.java index 3957ae0d..d2628ab2 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/package-info.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/package-info.java @@ -1,10 +1,10 @@ /** - * Contains classes for retrieving the main {@link ProtocolMananger} object. + * Contains classes for retrieving the main ProtocolMananger object. *

* This allows plugins to reliably and easily read and modify the packet stream of any CraftBukkit-derivative * (or specifically compatible) Minecraft-server. *

- * This manager can be retrieved throught a static method in {@link ProtocolLibrary}: + * This manager can be retrieved throught a static method in ProtocolLibrary: *

  * {@code
  * ProtocolManager manager = ProtocolLibrary.getProtocolManager();
diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/MethodInfo.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/MethodInfo.java
index fafe48de..a2a9585f 100644
--- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/MethodInfo.java
+++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/MethodInfo.java
@@ -180,7 +180,8 @@ public abstract class MethodInfo implements GenericDeclaration, Member {
 	/**
 	 * Returns a string describing this method or constructor
 	 * @return A string representation of the object.
-	 * @see {@link Method#toString()} or {@link Constructor#toString()}
+	 * @see Method#toString()
+	 * @see Constructor#toString()
 	 */
 	@Override
 	public String toString() {
@@ -190,7 +191,8 @@ public abstract class MethodInfo implements GenericDeclaration, Member {
 	/**
 	 * Returns a string describing this method or constructor, including type parameters.
 	 * @return A string describing this Method, include type parameters
-	 * @see {@link Method#toGenericString()} or {@link Constructor#toGenericString()}
+	 * @see Method#toGenericString()
+	 * @see Constructor#toGenericString()
 	 */
 	public abstract String toGenericString();
 	
@@ -198,7 +200,8 @@ public abstract class MethodInfo implements GenericDeclaration, Member {
 	 * Returns an array of Class objects that represent the types of the exceptions declared to be thrown by the 
 	 * underlying method or constructor represented by this MethodInfo object.
 	 * @return The exception types declared as being thrown by the method or constructor this object represents.
-	 * @see {@link Method#getExceptionTypes()} or {@link Constructor#getExceptionTypes()}
+	 * @see Method#getExceptionTypes()
+	 * @see Constructor#getExceptionTypes()
 	 */
 	public abstract Class[] getExceptionTypes();
 
@@ -208,7 +211,7 @@ public abstract class MethodInfo implements GenericDeclaration, Member {
 	 * 

* This is always {@link Void} for constructors. * @return The return value, or Void if a constructor. - * @see {@link Method#getReturnType()} + * @see Method#getReturnType() */ public abstract Class getReturnType(); @@ -216,7 +219,8 @@ public abstract class MethodInfo implements GenericDeclaration, Member { * Returns an array of Class objects that represent the formal parameter types, in declaration order, * of the method or constructor represented by this MethodInfo object. * @return The parameter types for the method or constructor this object represents. - * @see {@link Method#getParameterTypes()} or {@link Constructor#getParameterTypes()} + * @see Method#getParameterTypes() + * @see Constructor#getParameterTypes() */ public abstract Class[] getParameterTypes(); diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/PrettyPrinter.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/PrettyPrinter.java index 19ccea42..a4e56b50 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/PrettyPrinter.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/PrettyPrinter.java @@ -104,7 +104,7 @@ public class PrettyPrinter { * @param object - the object to serialize. * @param stop - superclass that will stop the process. * @param hierachyDepth - maximum recursion level. - * @param transformer - a generic object printer. + * @param printer - a generic object printer. * @return String representation of the class. * @throws IllegalAccessException */ diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMatcher.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMatcher.java index 0e522142..725d3b5b 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMatcher.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/AbstractFuzzyMatcher.java @@ -38,7 +38,7 @@ public abstract class AbstractFuzzyMatcher implements Comparable * Matchers with a lower round number are applied before matchers with a higher round number. * @return The round number. - * @see {@link #calculateRoundNumber()} + * @see #calculateRoundNumber() */ public final int getRoundNumber() { if (roundNumber == null) { diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyClassContract.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyClassContract.java index 3a15ab44..a8236da0 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyClassContract.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/fuzzy/FuzzyClassContract.java @@ -109,7 +109,7 @@ public class FuzzyClassContract extends AbstractFuzzyMatcher> { /** * Add a new base class contract. - * @param matcher - builder for the new base class contract. + * @param builder - builder for the new base class contract. * @return This builder, for chaining. */ public Builder baseclass(FuzzyClassContract.Builder builder) { @@ -128,7 +128,7 @@ public class FuzzyClassContract extends AbstractFuzzyMatcher> { /** * Add a new interface contract. - * @param matcher - builder for the new interface contract. + * @param builder - builder for the new interface contract. * @return This builder, for chaining. */ public Builder interfaces(FuzzyClassContract.Builder builder) { diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/DefaultInstances.java b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/DefaultInstances.java index f5fa9e54..41306b56 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/DefaultInstances.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/reflect/instances/DefaultInstances.java @@ -83,7 +83,7 @@ public class DefaultInstances implements InstanceProvider { /** * Construct a default instance generator using the given instance providers. - * @param instaceProviders - array of instance providers. + * @param instanceProviders - array of instance providers. * @return An default instance generator. */ public static DefaultInstances fromArray(InstanceProvider... instanceProviders) { @@ -92,7 +92,7 @@ public class DefaultInstances implements InstanceProvider { /** * Construct a default instance generator using the given instance providers. - * @param instaceProviders - collection of instance providers. + * @param instanceProviders - collection of instance providers. * @return An default instance generator. */ public static DefaultInstances fromCollection(Collection instanceProviders) { diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/timing/TimedListenerManager.java b/ProtocolLib/src/main/java/com/comphenix/protocol/timing/TimedListenerManager.java index e6b516d4..a624f711 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/timing/TimedListenerManager.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/timing/TimedListenerManager.java @@ -138,8 +138,8 @@ public class TimedListenerManager { } /** - * Retrieve the timed tracker associated with the given listener and listener type. - * @param listener - the listener. + * Retrieve the timed tracker associated with the given plugin and listener type. + * @param pluginName - the plugin name. * @param type - the listener type. * @return The timed tracker. */ @@ -170,7 +170,7 @@ public class TimedListenerManager { /** * Retrieve a new map of trackers for an unspecified plugin. - * @return + * @return A map of listeners and timed trackers. */ private ImmutableMap newTrackerMap() { ImmutableMap.Builder builder = ImmutableMap.builder(); diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftVersion.java b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftVersion.java index e1703e92..d8a07dd4 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftVersion.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/MinecraftVersion.java @@ -254,7 +254,7 @@ public class MinecraftVersion implements Comparable { /** * Extract the Minecraft version from CraftBukkit itself. - * @param server - the server object representing CraftBukkit. + * @param text - the server version in text form. * @return The underlying MC version. * @throws IllegalStateException If we could not parse the version string. */ diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/SafeCacheBuilder.java b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/SafeCacheBuilder.java index 4d6922e5..d46bf70b 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/SafeCacheBuilder.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/SafeCacheBuilder.java @@ -66,9 +66,10 @@ public class SafeCacheBuilder { /** * Specifies that each entry should be automatically removed from the cache * once a fixed duration has elapsed after the entry's creation, or last - * access. Access time is reset by {@link Cache#get} and - * {@link Cache#getUnchecked}, but not by operations on the view returned by - * {@link Cache#asMap}. + * access. Access time is reset by {@link com.google.common.cache.Cache#get Cache.get()} and + * {@link com.google.common.cache.Cache#getUnchecked Cache.getUnchecked()}, + * but not by operations on the view returned by + * {@link com.google.common.cache.Cache#asMap() Cache.asMap()}. * *

* When {@code duration} is zero, elements will be evicted immediately after @@ -77,7 +78,7 @@ public class SafeCacheBuilder { * or to disable caching temporarily without a code change. * *

- * Expired entries may be counted by {@link Cache#size}, but will never be + * Expired entries may be counted by {@link com.google.common.cache.Cache#size Cache.size()}, but will never be * visible to read or write operations. Expired entries are currently * cleaned up during write operations, or during occasional read operations * in the absense of writes; though this behavior may change in the future. @@ -89,7 +90,6 @@ public class SafeCacheBuilder { * @throws IllegalStateException if the time to idle or time to live was * already set */ - public SafeCacheBuilder expireAfterAccess(long duration, TimeUnit unit) { builder.expireAfterAccess(duration, unit); return this; @@ -107,7 +107,7 @@ public class SafeCacheBuilder { * or to disable caching temporarily without a code change. * *

- * Expired entries may be counted by {@link Cache#size}, but will never be + * Expired entries may be counted by {@link com.google.common.cache.Cache#size Cache.size()}, but will never be * visible to read or write operations. Expired entries are currently * cleaned up during write operations, or during occasional read operations * in the absense of writes; though this behavior may change in the future. @@ -173,7 +173,7 @@ public class SafeCacheBuilder { *

* Each cache built by this {@code CacheBuilder} after this method is called * invokes the supplied listener after removing an element for any reason - * (see removal causes in {@link RemovalCause}). It will invoke the listener + * (see removal causes in {@link com.google.common.cache.RemovalCause RemovalCause}). It will invoke the listener * during invocations of any of that cache's public methods (even read-only * methods). * @@ -188,7 +188,7 @@ public class SafeCacheBuilder { * provided; the {@code CacheBuilder} type cannot do this. For best results, * simply use the standard method-chaining idiom, as illustrated in the * documentation at top, configuring a {@code CacheBuilder} and building - * your {@link Cache} all in a single statement. + * your {@link com.google.common.cache.Cache Cache} all in a single statement. * *

* Warning: if you ignore the above advice, and use this @@ -222,7 +222,7 @@ public class SafeCacheBuilder { /** * Specifies that each value (not key) stored in the cache should be wrapped - * in a {@link SoftReference} (by default, strong references are used). + * in a {@link java.lang.ref.SoftReference SoftReference} (by default, strong references are used). * Softly-referenced objects will be garbage-collected in a globally * least-recently-used manner, in response to memory demand. * @@ -238,7 +238,6 @@ public class SafeCacheBuilder { * * @throws IllegalStateException if the value strength was already set */ - public SafeCacheBuilder softValues() { builder.softValues(); return this; @@ -246,7 +245,7 @@ public class SafeCacheBuilder { /** * Specifies that each key (not value) stored in the cache should be wrapped - * in a {@link WeakReference} (by default, strong references are used). + * in a {@link java.lang.ref.WeakReference WeakReference} (by default, strong references are used). * *

* Warning: when this method is used, the resulting cache will use @@ -261,7 +260,7 @@ public class SafeCacheBuilder { /** * Specifies that each value (not key) stored in the cache should be wrapped - * in a {@link WeakReference} (by default, strong references are used). + * in a {@link java.lang.ref.WeakReference WeakReference} (by default, strong references are used). * *

* Weak values will be garbage collected once they are weakly reachable. diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/StreamSerializer.java b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/StreamSerializer.java index 6c0b9d8a..49c21c80 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/utility/StreamSerializer.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/utility/StreamSerializer.java @@ -188,7 +188,7 @@ public class StreamSerializer { * Note: An NBT compound can be written to a stream even if it's NULL. * * @param output - the target output stream. - * @param stack - the NBT compound to be serialized, or NULL to represent nothing. + * @param compound - the NBT compound to be serialized, or NULL to represent nothing. * @throws IOException If the operation fails due to reflection problems. */ public void serializeCompound(@Nonnull DataOutputStream output, NbtCompound compound) throws IOException { @@ -217,13 +217,12 @@ public class StreamSerializer { } /** - * Deserialize a string using the standard Minecraft UTF-16 encoding. + * Serialize a string using the standard Minecraft UTF-16 encoding. *

* Note that strings cannot exceed 32767 characters, regardless if maximum lenght. - * @param input - the input stream. - * @param maximumLength - the maximum lenght of the string. - * @return - * @throws IOException + * @param output - the output stream. + * @param text - the string to serialize. + * @throws IOException If the data in the string cannot be written. */ public void serializeString(@Nonnull DataOutputStream output, String text) throws IOException { if (output == null) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedAttribute.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedAttribute.java index 3e0a08cd..aea421c3 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedAttribute.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedAttribute.java @@ -315,7 +315,7 @@ public class WrappedAttribute { * Change the base value of the attribute. *

* The modifiers will automatically supply a value if this is unset. - * @param value - the final value. + * @param baseValue - the base value value. * @return This builder, for chaining. */ public Builder baseValue(double baseValue) { @@ -337,8 +337,6 @@ public class WrappedAttribute { /** * Set the modifers that will be supplied to the client, and used to compute the final value. - *

- * Call {@link #recomputeValue()} to force the builder to recompute the final value. * @param modifiers - the attribute modifiers. * @return This builder, for chaining. */ diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedAttributeModifier.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedAttributeModifier.java index 328e3e2e..bc857a03 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedAttributeModifier.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedAttributeModifier.java @@ -354,7 +354,7 @@ public class WrappedAttributeModifier { /** * Set a human readable name of this modifier. - * @param attributeKey - the attribute key to supply to the new object. + * @param name - the name of the modifier. * @return This builder, for chaining. */ public Builder name(@Nonnull String name) {