[docs] Fix warnings about undocumented default constructors (#6151)

This commit is contained in:
Tyler Veness
2024-01-04 13:57:21 -08:00
committed by GitHub
parent 0f060afb55
commit 4210f5635d
17 changed files with 55 additions and 3 deletions

View File

@@ -12,6 +12,9 @@ public class VideoCamera extends VideoSource {
public static final int kFixedOutdoor2 = 5000;
public static final int kFixedFluorescent1 = 5100;
public static final int kFixedFlourescent2 = 5200;
/** Default constructor. */
public WhiteBalance() {}
}
protected VideoCamera(int handle) {

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.hal;
/**
* JNI wrapper for library <b>FRC_NetworkCommunication</b><br>.
*/
public class FRCNetComm {
public final class FRCNetComm {
/**
* Resource type from UsageReporting.
*/
@@ -31,4 +31,7 @@ ${usage_reporting_types}
${usage_reporting_instances}
}
/** Utility class. */
private FRCNetComm() {}
}

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.hal;
/**
* JNI wrapper for library <b>FRC_NetworkCommunication</b><br>.
*/
public class FRCNetComm {
public final class FRCNetComm {
/**
* Resource type from UsageReporting.
*/
@@ -367,4 +367,7 @@ public class FRCNetComm {
/** kOdometry_SwerveDrive = 3. */
public static final int kOdometry_SwerveDrive = 3;
}
/** Utility class. */
private FRCNetComm() {}
}

View File

@@ -10,7 +10,8 @@ package edu.wpi.first.hal;
* <p>This class defines enums for CAN device types and manufacturer IDs as specified in the WPILib
* documentation: https://docs.wpilib.org/en/stable/docs/software/can-devices/can-addressing.html
*/
public class CANAPITypes {
@SuppressWarnings("PMD.MissingStaticMethodInNonInstantiatableClass")
public final class CANAPITypes {
/**
* FRC CAN device type.
*
@@ -80,4 +81,7 @@ public class CANAPITypes {
this.id = id;
}
}
/** Utility class. */
private CANAPITypes() {}
}

View File

@@ -15,6 +15,9 @@ public class CANData {
/** CAN frame timestamp in milliseconds. */
public long timestamp;
/** Default constructor. */
public CANData() {}
/**
* API used from JNI to set the data.
*

View File

@@ -17,6 +17,9 @@ public class CANStreamMessage {
@SuppressWarnings("MemberName")
public int messageID;
/** Default constructor. */
public CANStreamMessage() {}
/**
* API used from JNI to set the data.
*

View File

@@ -13,6 +13,9 @@ public class ControlWord {
private boolean m_fmsAttached;
private boolean m_dsAttached;
/** Default constructor. */
public ControlWord() {}
void update(
boolean enabled,
boolean autonomous,

View File

@@ -26,6 +26,9 @@ public class DMAJNISample {
private long m_timeStamp;
private Map<Integer, BaseStore> m_propertyMap = new HashMap<>();
/** Default constructor. */
public DMAJNISample() {}
public int update(int dmaHandle, double timeoutSeconds) {
m_timeStamp = DMAJNI.readDMA(dmaHandle, timeoutSeconds, m_dataBuffer, m_storage);
return m_storage[25];

View File

@@ -22,6 +22,9 @@ public class MatchInfoData {
/** Stores the match type. */
public int matchType;
/** Default constructor. */
public MatchInfoData() {}
/**
* Called from JNI to set the structure data.
*

View File

@@ -23,6 +23,9 @@ public class CANJNI extends JNIWrapper {
public static final int CAN_IS_FRAME_REMOTE = 0x80000000;
public static final int CAN_IS_FRAME_11BIT = 0x40000000;
/** Default constructor. */
public CANJNI() {}
/**
* Sends a CAN message.
*

View File

@@ -22,6 +22,9 @@ public class CANStatus {
/** The CAN Bus transmit error count. */
public int transmitErrorCount;
/** Default constructor. */
public CANStatus() {}
/**
* Set CAN bus status.
*

View File

@@ -12,4 +12,7 @@ public class NIRioStatus {
public static final int kRIOStatusOperationTimedOut = -52007;
public static final int kRIOStatusFeatureNotSupported = kRioStatusOffset - 193;
public static final int kRIOStatusResourceNotInitialized = -52010;
/** Default constructor. */
public NIRioStatus() {}
}

View File

@@ -41,6 +41,9 @@ public class DMASample {
private final DMAJNISample m_dmaSample = new DMAJNISample();
/** Default constructor. */
public DMASample() {}
public DMAReadStatus update(DMA dma, double timeoutSeconds) {
return DMAReadStatus.getValue(m_dmaSample.update(dma.m_dmaHandle, timeoutSeconds));
}

View File

@@ -11,6 +11,9 @@ package edu.wpi.first.wpilibj;
* source. The source can either be a digital input or analog trigger but not both.
*/
public abstract class DigitalSource implements AutoCloseable {
/** Default constructor. */
public DigitalSource() {}
/**
* Returns true if this DigitalSource is an AnalogTrigger.
*

View File

@@ -15,6 +15,9 @@ public final class EventLoop {
private final Collection<Runnable> m_bindings = new LinkedHashSet<>();
private boolean m_running;
/** Default constructor. */
public EventLoop() {}
/**
* Bind a new action to run when the loop is polled.
*

View File

@@ -109,6 +109,9 @@ public class SendableBuilderImpl implements NTSendableBuilder {
private final List<AutoCloseable> m_closeables = new ArrayList<>();
/** Default constructor. */
public SendableBuilderImpl() {}
@Override
@SuppressWarnings("PMD.AvoidCatchingGenericException")
public void close() {

View File

@@ -54,6 +54,9 @@ public class LongToObjectHashMap<V> {
@SuppressWarnings("unchecked")
private V[] m_values = (V[]) new Object[m_capacity];
/** Default constructor. */
public LongToObjectHashMap() {}
/**
* Puts a value {@code value} corresponding to key {@code key} in the map.
*