Satisfy javadoc linter.
This commit is contained in:
@@ -44,7 +44,7 @@ archivesBaseName = "${mod_name}-MC${minecraft_version}"
|
||||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
|
||||
compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
|
||||
//javadoc.options.addStringOption('Xdoclint:none', '-quiet')
|
||||
|
||||
configurations {
|
||||
embed
|
||||
|
||||
@@ -16,7 +16,7 @@ public final class API {
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>
|
||||
* InterModComms.sendTo(API.MOD_ID, API.IMC_ADD_DEVICE_PROVIDER, () -> new DeviceProvider() { ... });
|
||||
* InterModComms.sendTo(API.MOD_ID, API.IMC_ADD_DEVICE_PROVIDER, () -> new DeviceProvider() { ... });
|
||||
* </pre>
|
||||
*/
|
||||
public static final String IMC_ADD_DEVICE_PROVIDER = "addDeviceProvider";
|
||||
|
||||
@@ -7,7 +7,7 @@ package li.cil.oc2.api.bus;
|
||||
* managing the bus.
|
||||
* <p>
|
||||
* Note that it is strongly encouraged for implementations to provide an overloaded
|
||||
* {@link #equals(Object)} and {@link #hashCode()} so that identical devices can be
|
||||
* {@link Object#equals(Object)} and {@link Object#hashCode()} so that identical devices can be
|
||||
* detected.
|
||||
*/
|
||||
public interface Device {
|
||||
|
||||
@@ -29,16 +29,22 @@ public @interface Callback {
|
||||
* Use this when the targeted method interacts with data that is not thread
|
||||
* safe, for example the world or any objects inside the world, such as
|
||||
* tile entities and entities.
|
||||
*
|
||||
* @return {@code true} when to be executed on main thread; {@code false} otherwise.
|
||||
*/
|
||||
boolean synchronize() default true;
|
||||
|
||||
/**
|
||||
* Option VM visible documentation of this method.
|
||||
*
|
||||
* @return the description of the method.
|
||||
*/
|
||||
String description() default "";
|
||||
|
||||
/**
|
||||
* Optional VM visible documentation of the values returned by this method.
|
||||
*
|
||||
* @return the description of the return value.
|
||||
*/
|
||||
String returnValueDescription() default "";
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public final class Callbacks {
|
||||
* public void f(String a) { }
|
||||
* }
|
||||
*
|
||||
* List<DeviceMethod> methods = Callbacks.collectMethods(new Example());
|
||||
* List<RPCMethod> methods = Callbacks.collectMethods(new Example());
|
||||
* methods.get(0).invoke("argument");
|
||||
* </pre>
|
||||
*
|
||||
|
||||
@@ -20,11 +20,15 @@ import java.lang.annotation.Target;
|
||||
public @interface Parameter {
|
||||
/**
|
||||
* The name of the parameter as seen by the VM.
|
||||
*
|
||||
* @return the name of the parameter.
|
||||
*/
|
||||
String value();
|
||||
|
||||
/**
|
||||
* Optional VM visible documentation of this parameter.
|
||||
*
|
||||
* @return the description of the parameter.
|
||||
*/
|
||||
String description() default "";
|
||||
}
|
||||
|
||||
@@ -32,11 +32,15 @@ public interface RPCDevice extends Device {
|
||||
* <p>
|
||||
* In a more general sense, these can be considered tags the device can be
|
||||
* referenced by inside a VM.
|
||||
*
|
||||
* @return the list of type names.
|
||||
*/
|
||||
List<String> getTypeNames();
|
||||
|
||||
/**
|
||||
* The list of methods provided by this interface.
|
||||
*
|
||||
* @return the list of methods.
|
||||
*/
|
||||
List<RPCMethod> getMethods();
|
||||
}
|
||||
|
||||
@@ -25,21 +25,29 @@ public interface RPCMethod {
|
||||
* When invoked through a {@link DeviceBusController} this is what the method
|
||||
* will be referenced by, so the name should be unlikely to be duplicated in
|
||||
* another device to avoid ambiguity when devices are combined.
|
||||
*
|
||||
* @return the name of the method.
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* When {@code true}, invocations of this method will be synchronized to the main thread.
|
||||
*
|
||||
* @return {@code true} when to be executed on main thread; {@code false} otherwise.
|
||||
*/
|
||||
boolean isSynchronized();
|
||||
|
||||
/**
|
||||
* The type of the values returned by this method.
|
||||
*
|
||||
* @return the returned type.
|
||||
*/
|
||||
Class<?> getReturnType();
|
||||
|
||||
/**
|
||||
* The list of parameters this method accepts.
|
||||
*
|
||||
* @return the list of parameters.
|
||||
*/
|
||||
RPCParameter[] getParameters();
|
||||
|
||||
@@ -68,6 +76,8 @@ public interface RPCMethod {
|
||||
* An optional description of the method.
|
||||
* <p>
|
||||
* May be used inside VMs to generate documentation.
|
||||
*
|
||||
* @return the method description.
|
||||
*/
|
||||
default Optional<String> getDescription() {
|
||||
return Optional.empty();
|
||||
@@ -77,6 +87,8 @@ public interface RPCMethod {
|
||||
* An optional description of the return value of this method.
|
||||
* <p>
|
||||
* May be used inside VMs to generate documentation.
|
||||
*
|
||||
* @return the return value description.
|
||||
*/
|
||||
default Optional<String> getReturnValueDescription() {
|
||||
return Optional.empty();
|
||||
|
||||
@@ -24,6 +24,8 @@ public interface RPCParameter {
|
||||
* An optional name of the parameter.
|
||||
* <p>
|
||||
* May be used inside VMs to generate documentation.
|
||||
*
|
||||
* @return the name of the parameter.
|
||||
*/
|
||||
default Optional<String> getName() {
|
||||
return Optional.empty();
|
||||
@@ -33,6 +35,8 @@ public interface RPCParameter {
|
||||
* An optional description of the parameter.
|
||||
* <p>
|
||||
* May be used inside VMs to generate documentation.
|
||||
*
|
||||
* @return the description of the parameter.
|
||||
*/
|
||||
default Optional<String> getDescription() {
|
||||
return Optional.empty();
|
||||
|
||||
@@ -21,7 +21,7 @@ import net.minecraftforge.common.util.LazyOptional;
|
||||
* Implementations <em>should</em> return the same device for the same query.
|
||||
* <p>
|
||||
* Failing that, implementations <em>should</em> return instances that are equal to each
|
||||
* other when compared using {@link #equals(Object)} and have equal {@link #hashCode()}s.
|
||||
* other when compared using {@link Object#equals(Object)} and have equal {@link Object#hashCode()}s.
|
||||
* <p>
|
||||
* This is required to avoid device duplication when a device is connected to a bus more
|
||||
* than once (e.g. for blocks when connected cables are adjacent to multiple faces of the
|
||||
|
||||
Reference in New Issue
Block a user