+ * Indicates that the underlying `Collection` or `Map` is unmodifiable.
+ * Any attempts to mutate such a collection or map may result in exceptions being
+ * thrown, or no result at all.
+ *
+ *
+ * The referenced objects within the collection or map may still be mutable, depending on
+ * their implementation.
+ *
+ *
+ * @since 0.2.0
+ */
+@Target({ElementType.TYPE_USE})
+@Retention(RetentionPolicy.CLASS)
+@Documented
+public @interface Unmodifiable {
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
index 3056266..e506b62 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
@@ -7,9 +7,9 @@
import com.google.gson.Gson;
import com.google.gson.JsonElement;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.jetbrains.annotations.Unmodifiable;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
import java.util.ArrayList;
import java.util.Collections;
@@ -85,7 +85,7 @@ public interface CommonDMIMapper {
* no mappable data is found
* @since 0.1.0
*/
- default @NotNull Optional mapToEntity(@Nullable String rawDMIData, @NotNull Class mappableEntityClass) {
+ default @NonNull Optional mapToEntity(@Nullable String rawDMIData, @NonNull Class mappableEntityClass) {
if(rawDMIData==null)
return Optional.empty();
@@ -185,7 +185,7 @@ public interface CommonDMIMapper {
* @return a non-null list of mapped entities
* @since 0.1.0
*/
- default @NotNull @Unmodifiable List mapToList(@Nullable String rawDMIData, @NotNull Class mappableEntityClass) {
+ default @NonNull @Unmodifiable List mapToList(@Nullable String rawDMIData, @NonNull Class mappableEntityClass) {
if(rawDMIData==null)
return Collections.emptyList();
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
index 6410913..8785c18 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
@@ -10,7 +10,7 @@
import io.github.eggy03.dmidecode.mapper.board.DMIBIOSLanguageMapper;
import io.github.eggy03.dmidecode.service.OptionalCommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import java.util.Optional;
@@ -47,8 +47,7 @@ public class DMIBIOSLanguageService implements OptionalCommonDMIServiceInterface
* @since 0.1.0
*/
@Override
- @NotNull
- public Optional get(long timeout) {
+ public @NonNull Optional get(long timeout) {
return new DMIBIOSLanguageMapper().mapToEntity(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.BIOS_LANGUAGE.getValue()), timeout),
DMIBIOSLanguage.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
index ba2cd74..dc3b490 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
@@ -5,12 +5,13 @@
*/
package io.github.eggy03.dmidecode.service.board;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
import io.github.eggy03.dmidecode.constant.DMIType;
import io.github.eggy03.dmidecode.entity.board.DMIBIOS;
import io.github.eggy03.dmidecode.mapper.board.DMIBIOSMapper;
import io.github.eggy03.dmidecode.service.CommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import java.util.List;
@@ -47,8 +48,7 @@ public class DMIBIOSService implements CommonDMIServiceInterface {
* @since 0.1.0
*/
@Override
- @NotNull
- public List get(long timeout) {
+ public @NonNull @Unmodifiable List get(long timeout) {
return new DMIBIOSMapper().mapToList(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.BIOS.getValue()), timeout),
DMIBIOS.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
index 0964303..7532a13 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
@@ -10,7 +10,7 @@
import io.github.eggy03.dmidecode.mapper.board.DMIBaseboardMapper;
import io.github.eggy03.dmidecode.service.OptionalCommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import java.util.Optional;
@@ -48,8 +48,7 @@ public class DMIBaseboardService implements OptionalCommonDMIServiceInterface get(long timeout) {
+ public @NonNull Optional get(long timeout) {
return new DMIBaseboardMapper().mapToEntity(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.BASEBOARD.getValue()), timeout),
DMIBaseboard.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java
index a7c7f9f..282164e 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java
@@ -10,7 +10,7 @@
import io.github.eggy03.dmidecode.mapper.board.DMIChassisMapper;
import io.github.eggy03.dmidecode.service.OptionalCommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import java.util.Optional;
@@ -47,8 +47,7 @@ public class DMIChassisService implements OptionalCommonDMIServiceInterface get(long timeout) {
+ public @NonNull Optional get(long timeout) {
return new DMIChassisMapper().mapToEntity(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.CHASSIS.getValue()), timeout),
DMIChassis.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java
index 3d57edf..6ea8ceb 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java
@@ -5,11 +5,13 @@
*/
package io.github.eggy03.dmidecode.service.board;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
import io.github.eggy03.dmidecode.constant.DMIType;
import io.github.eggy03.dmidecode.entity.board.DMIPortConnectorInformation;
import io.github.eggy03.dmidecode.mapper.board.DMIPortConnectionInformationMapper;
import io.github.eggy03.dmidecode.service.CommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
+import org.jspecify.annotations.NonNull;
import java.util.List;
@@ -47,7 +49,7 @@ public class DMIPortConnectorInformationService implements CommonDMIServiceInter
* @since 0.1.0
*/
@Override
- public List get(long timeout) {
+ public @Unmodifiable @NonNull List get(long timeout) {
return new DMIPortConnectionInformationMapper().mapToList(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.PORT_CONNECTOR.getValue()), timeout),
DMIPortConnectorInformation.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java
index e1df848..d275212 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java
@@ -5,11 +5,13 @@
*/
package io.github.eggy03.dmidecode.service.board;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
import io.github.eggy03.dmidecode.constant.DMIType;
import io.github.eggy03.dmidecode.entity.board.DMISystemSlots;
import io.github.eggy03.dmidecode.mapper.board.DMISystemSlotsMapper;
import io.github.eggy03.dmidecode.service.CommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
+import org.jspecify.annotations.NonNull;
import java.util.List;
@@ -47,7 +49,7 @@ public class DMISystemSlotsService implements CommonDMIServiceInterface get(long timeout) {
+ public @Unmodifiable @NonNull List get(long timeout) {
return new DMISystemSlotsMapper().mapToList(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.SYSTEM_SLOTS.getValue()), timeout),
DMISystemSlots.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java
index fb7a682..0108209 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java
@@ -5,12 +5,13 @@
*/
package io.github.eggy03.dmidecode.service.memory;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
import io.github.eggy03.dmidecode.constant.DMIType;
import io.github.eggy03.dmidecode.entity.memory.DMIMemoryDevice;
import io.github.eggy03.dmidecode.mapper.physicalmemory.DMIMemoryDeviceMapper;
import io.github.eggy03.dmidecode.service.CommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import java.util.List;
@@ -48,8 +49,7 @@ public class DMIMemoryDeviceService implements CommonDMIServiceInterface get(long timeout) {
+ public @Unmodifiable @NonNull List get(long timeout) {
return new DMIMemoryDeviceMapper().mapToList(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.MEMORY_DEVICE.getValue()), timeout),
DMIMemoryDevice.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java
index 678c53e..60136aa 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java
@@ -10,6 +10,7 @@
import io.github.eggy03.dmidecode.mapper.physicalmemory.DMIPhysicalMemoryArrayMapper;
import io.github.eggy03.dmidecode.service.OptionalCommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
+import org.jspecify.annotations.NonNull;
import java.util.Optional;
@@ -47,7 +48,7 @@ public class DMIPhysicalMemoryArrayService implements OptionalCommonDMIServiceIn
* @since 0.1.0
*/
@Override
- public Optional get(long timeout) {
+ public @NonNull Optional get(long timeout) {
return new DMIPhysicalMemoryArrayMapper().mapToEntity(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.PHYSICAL_MEMORY_ARRAY.getValue()), timeout),
DMIPhysicalMemoryArray.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java b/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java
index f9017a4..f8ddd07 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java
@@ -5,11 +5,13 @@
*/
package io.github.eggy03.dmidecode.service.peripheral;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
import io.github.eggy03.dmidecode.constant.DMIType;
import io.github.eggy03.dmidecode.entity.peripheral.DMIPortableBattery;
import io.github.eggy03.dmidecode.mapper.peripheral.DMIPortableBatteryMapper;
import io.github.eggy03.dmidecode.service.CommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
+import org.jspecify.annotations.NonNull;
import java.util.List;
@@ -47,7 +49,7 @@ public class DMIPortableBatteryService implements CommonDMIServiceInterface get(long timeout) {
+ public @Unmodifiable @NonNull List get(long timeout) {
return new DMIPortableBatteryMapper().mapToList(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.PORTABLE_BATTERY.getValue()), timeout),
DMIPortableBattery.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java
index 1e4385f..28b9ff3 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java
@@ -5,12 +5,13 @@
*/
package io.github.eggy03.dmidecode.service.processor;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
import io.github.eggy03.dmidecode.constant.DMIType;
import io.github.eggy03.dmidecode.entity.processor.DMICache;
import io.github.eggy03.dmidecode.mapper.processor.DMICacheMapper;
import io.github.eggy03.dmidecode.service.CommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import java.util.List;
@@ -48,8 +49,7 @@ public class DMICacheService implements CommonDMIServiceInterface {
* @since 0.1.0
*/
@Override
- @NotNull
- public List get(long timeout) {
+ public @Unmodifiable @NonNull List get(long timeout) {
return new DMICacheMapper().mapToList(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.CACHE.getValue()), timeout),
DMICache.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
index 5d32b7e..ac26b14 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
@@ -5,12 +5,13 @@
*/
package io.github.eggy03.dmidecode.service.processor;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
import io.github.eggy03.dmidecode.constant.DMIType;
import io.github.eggy03.dmidecode.entity.processor.DMIProcessor;
import io.github.eggy03.dmidecode.mapper.processor.DMIProcessorMapper;
import io.github.eggy03.dmidecode.service.CommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import java.util.List;
@@ -47,8 +48,7 @@ public class DMIProcessorService implements CommonDMIServiceInterface get(long timeout) {
+ public @Unmodifiable @NonNull List get(long timeout) {
return new DMIProcessorMapper().mapToList(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.PROCESSOR.getValue()), timeout),
DMIProcessor.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java b/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java
index 5852d7e..d728994 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java
@@ -5,12 +5,13 @@
*/
package io.github.eggy03.dmidecode.service.system;
+import io.github.eggy03.dmidecode.annotation.Unmodifiable;
import io.github.eggy03.dmidecode.constant.DMIType;
import io.github.eggy03.dmidecode.entity.system.DMISystem;
import io.github.eggy03.dmidecode.mapper.system.DMISystemMapper;
import io.github.eggy03.dmidecode.service.OptionalCommonDMIServiceInterface;
import io.github.eggy03.dmidecode.utility.TerminalUtility;
-import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
import java.util.Optional;
@@ -48,8 +49,7 @@ public class DMISystemService implements OptionalCommonDMIServiceInterface get(long timeout) {
+ public @Unmodifiable @NonNull Optional get(long timeout) {
return new DMISystemMapper().mapToEntity(
TerminalUtility.executeCommand(DMIType.getCommand(DMIType.SYSTEM.getValue()), timeout),
DMISystem.class
diff --git a/src/main/java/io/github/eggy03/dmidecode/utility/TerminalUtility.java b/src/main/java/io/github/eggy03/dmidecode/utility/TerminalUtility.java
index 14a0858..7bfe63f 100644
--- a/src/main/java/io/github/eggy03/dmidecode/utility/TerminalUtility.java
+++ b/src/main/java/io/github/eggy03/dmidecode/utility/TerminalUtility.java
@@ -6,6 +6,7 @@
package io.github.eggy03.dmidecode.utility;
import io.github.eggy03.dmidecode.exception.TerminalExecutionException;
+import lombok.NonNull;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.exec.CommandLine;
@@ -13,7 +14,6 @@
import org.apache.commons.exec.ExecuteException;
import org.apache.commons.exec.ExecuteWatchdog;
import org.apache.commons.exec.PumpStreamHandler;
-import org.jetbrains.annotations.NotNull;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -23,7 +23,7 @@
* A utility class that provides a way to launch a terminal session
*
* Mostly for internal use
- * @author Sayan Bhattacharya
+ *
* @since 0.1.0
*/
@UtilityClass
@@ -41,7 +41,7 @@ public class TerminalUtility {
* or when the command yields an error, or when the terminal cannot be accessed.
* @throws IllegalArgumentException If the provided timeout is in the negative
*/
- public static String executeCommand(@NotNull String command, long timeoutSeconds) {
+ public static String executeCommand(@NonNull String command, long timeoutSeconds) {
if(timeoutSeconds<0)
throw new IllegalArgumentException("Timeout cannot be negative");
From bc7457619e51cf4e658b3a52b54223a73ee7c17f Mon Sep 17 00:00:00 2001
From: Egg-03 <111327101+eggy03@users.noreply.github.com>
Date: Tue, 31 Mar 2026 15:50:03 +0530
Subject: [PATCH 05/19] chore(docs): remove remaining author tags
---
src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java | 1 -
.../eggy03/dmidecode/exception/TerminalExecutionException.java | 1 -
.../java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java | 1 -
.../eggy03/dmidecode/mapper/board/DMIBIOSLanguageMapper.java | 1 -
.../io/github/eggy03/dmidecode/mapper/board/DMIBIOSMapper.java | 1 -
.../github/eggy03/dmidecode/mapper/board/DMIBaseboardMapper.java | 1 -
.../github/eggy03/dmidecode/mapper/board/DMIChassisMapper.java | 1 -
.../mapper/board/DMIPortConnectionInformationMapper.java | 1 -
.../eggy03/dmidecode/mapper/board/DMISystemSlotsMapper.java | 1 -
.../dmidecode/mapper/peripheral/DMIPortableBatteryMapper.java | 1 -
.../dmidecode/mapper/physicalmemory/DMIMemoryDeviceMapper.java | 1 -
.../mapper/physicalmemory/DMIPhysicalMemoryArrayMapper.java | 1 -
.../github/eggy03/dmidecode/mapper/processor/DMICacheMapper.java | 1 -
.../eggy03/dmidecode/mapper/processor/DMIProcessorMapper.java | 1 -
.../github/eggy03/dmidecode/mapper/system/DMISystemMapper.java | 1 -
.../eggy03/dmidecode/service/CommonDMIServiceInterface.java | 1 -
.../dmidecode/service/OptionalCommonDMIServiceInterface.java | 1 -
.../eggy03/dmidecode/service/board/DMIBIOSLanguageService.java | 1 -
.../io/github/eggy03/dmidecode/service/board/DMIBIOSService.java | 1 -
.../eggy03/dmidecode/service/board/DMIBaseboardService.java | 1 -
.../github/eggy03/dmidecode/service/board/DMIChassisService.java | 1 -
.../service/board/DMIPortConnectorInformationService.java | 1 -
.../eggy03/dmidecode/service/board/DMISystemSlotsService.java | 1 -
.../eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java | 1 -
.../dmidecode/service/memory/DMIPhysicalMemoryArrayService.java | 1 -
.../dmidecode/service/peripheral/DMIPortableBatteryService.java | 1 -
.../eggy03/dmidecode/service/processor/DMICacheService.java | 1 -
.../eggy03/dmidecode/service/processor/DMIProcessorService.java | 1 -
.../github/eggy03/dmidecode/service/system/DMISystemService.java | 1 -
29 files changed, 29 deletions(-)
diff --git a/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java b/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
index 48c5f12..9285755 100644
--- a/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
+++ b/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
@@ -23,7 +23,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
@RequiredArgsConstructor
@Getter
diff --git a/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java b/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
index eb43b7b..63b08a5 100644
--- a/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
+++ b/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
@@ -10,7 +10,6 @@
/**
* Thrown when the terminal fails to execute a command or a script
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
@StandardException
public class TerminalExecutionException extends RuntimeException {
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
index e506b62..9378ad9 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
@@ -43,7 +43,6 @@
*
* @param the entity type returned by the service implementation
* @since 0.1.0
- * @author Sayan Bhattacharjee
*/
public interface CommonDMIMapper {
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBIOSLanguageMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBIOSLanguageMapper.java
index 8d03cbe..7cc7e70 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBIOSLanguageMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBIOSLanguageMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMIBIOSLanguage}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIBIOSLanguageMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBIOSMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBIOSMapper.java
index 01b2801..7bfff0f 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBIOSMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBIOSMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMIBIOS}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIBIOSMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBaseboardMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBaseboardMapper.java
index e719e03..fe2c95e 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBaseboardMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIBaseboardMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMIBaseboard}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIBaseboardMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIChassisMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIChassisMapper.java
index 1ba18ce..08bf882 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIChassisMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIChassisMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMIChassis}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIChassisMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIPortConnectionInformationMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIPortConnectionInformationMapper.java
index 2af9739..99a7d44 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIPortConnectionInformationMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMIPortConnectionInformationMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMIPortConnectorInformation}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIPortConnectionInformationMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMISystemSlotsMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMISystemSlotsMapper.java
index fa32189..2b641ee 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMISystemSlotsMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/board/DMISystemSlotsMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMISystemSlots}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMISystemSlotsMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/peripheral/DMIPortableBatteryMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/peripheral/DMIPortableBatteryMapper.java
index d9938a0..83803e5 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/peripheral/DMIPortableBatteryMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/peripheral/DMIPortableBatteryMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMIPortableBattery}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIPortableBatteryMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/physicalmemory/DMIMemoryDeviceMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/physicalmemory/DMIMemoryDeviceMapper.java
index 680e52f..071970c 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/physicalmemory/DMIMemoryDeviceMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/physicalmemory/DMIMemoryDeviceMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMIMemoryDevice}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIMemoryDeviceMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/physicalmemory/DMIPhysicalMemoryArrayMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/physicalmemory/DMIPhysicalMemoryArrayMapper.java
index 3f0961e..9a9b515 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/physicalmemory/DMIPhysicalMemoryArrayMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/physicalmemory/DMIPhysicalMemoryArrayMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMIPhysicalMemoryArray}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIPhysicalMemoryArrayMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/processor/DMICacheMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/processor/DMICacheMapper.java
index 1d733ab..608ac44 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/processor/DMICacheMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/processor/DMICacheMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMICache}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMICacheMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/processor/DMIProcessorMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/processor/DMIProcessorMapper.java
index 5cc1957..960f886 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/processor/DMIProcessorMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/processor/DMIProcessorMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMIProcessor}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIProcessorMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/system/DMISystemMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/system/DMISystemMapper.java
index 151313b..02e14c8 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/system/DMISystemMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/system/DMISystemMapper.java
@@ -13,7 +13,6 @@
* and maps raw {@code dmidecode} output to objects or lists of {@link DMISystem}.
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMISystemMapper implements CommonDMIMapper {
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/CommonDMIServiceInterface.java b/src/main/java/io/github/eggy03/dmidecode/service/CommonDMIServiceInterface.java
index bd190e5..5397e7e 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/CommonDMIServiceInterface.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/CommonDMIServiceInterface.java
@@ -19,7 +19,6 @@
* @param the entity type returned by the service implementation
*
* @since 0.1.0
- * @author Sayan Bhattacharya
* @see OptionalCommonDMIServiceInterface
*/
public interface CommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/OptionalCommonDMIServiceInterface.java b/src/main/java/io/github/eggy03/dmidecode/service/OptionalCommonDMIServiceInterface.java
index cc463ea..ab3cb9f 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/OptionalCommonDMIServiceInterface.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/OptionalCommonDMIServiceInterface.java
@@ -19,7 +19,6 @@
* @param the entity type returned by the service implementation
*
* @since 0.1.0
- * @author Sayan Bhattacharya
* @see CommonDMIServiceInterface
*/
public interface OptionalCommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
index 8785c18..b029875 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
@@ -28,7 +28,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIBIOSLanguageService implements OptionalCommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
index dc3b490..847d840 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
@@ -29,7 +29,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIBIOSService implements CommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
index 7532a13..763855c 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
@@ -29,7 +29,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIBaseboardService implements OptionalCommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java
index 282164e..d4104dc 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java
@@ -28,7 +28,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIChassisService implements OptionalCommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java
index 6ea8ceb..521796c 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java
@@ -29,7 +29,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIPortConnectorInformationService implements CommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java
index d275212..3d0f8fc 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java
@@ -29,7 +29,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMISystemSlotsService implements CommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java
index 0108209..632466e 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java
@@ -29,7 +29,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIMemoryDeviceService implements CommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java
index 60136aa..6ca1f73 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java
@@ -28,7 +28,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIPhysicalMemoryArrayService implements OptionalCommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java b/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java
index f8ddd07..c0ca3d6 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java
@@ -29,7 +29,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIPortableBatteryService implements CommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java
index 28b9ff3..9bd5b06 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java
@@ -29,7 +29,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMICacheService implements CommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
index ac26b14..2e370f0 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
@@ -29,7 +29,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMIProcessorService implements CommonDMIServiceInterface {
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java b/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java
index d728994..068cf0d 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java
@@ -29,7 +29,6 @@
* }
*
* @since 0.1.0
- * @author Sayan Bhattacharya
*/
public class DMISystemService implements OptionalCommonDMIServiceInterface {
From 08f7c843c3cfdf9dda246ed767b41aa96cf0b9e7 Mon Sep 17 00:00:00 2001
From: Egg-03 <111327101+eggy03@users.noreply.github.com>
Date: Tue, 31 Mar 2026 15:50:17 +0530
Subject: [PATCH 06/19] chore: update developer mail
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 5786cb3..be014ef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
Egg-03Sayan Bhattacharjee
- egg03@duck.com
+ eggzerothree@proton.mehttps://github.com/eggy03/dmidecode4j.gitscm:git:ssh://git@github.com:eggy03/dmidecode4j.git
From 7b69c09fc3d1493550217cd8dcce164c592a684d Mon Sep 17 00:00:00 2001
From: Egg-03 <111327101+eggy03@users.noreply.github.com>
Date: Tue, 31 Mar 2026 15:57:12 +0530
Subject: [PATCH 07/19] refactor(dmitype): update command generation function
- Replace `DMIType.getCommand(int)` with `DMIType.getCommandFor(DMIType)`
- Remove Lombok's `@Getter` annotation from `DMIType` since `getValue()` is no longer needed to be a part of the public API contract.
- Update all service classes to use the new `DMIType.getCommandFor()` method
---
.../java/io/github/eggy03/dmidecode/constant/DMIType.java | 8 +++-----
.../dmidecode/service/board/DMIBIOSLanguageService.java | 2 +-
.../eggy03/dmidecode/service/board/DMIBIOSService.java | 2 +-
.../dmidecode/service/board/DMIBaseboardService.java | 2 +-
.../eggy03/dmidecode/service/board/DMIChassisService.java | 2 +-
.../service/board/DMIPortConnectorInformationService.java | 2 +-
.../dmidecode/service/board/DMISystemSlotsService.java | 2 +-
.../dmidecode/service/memory/DMIMemoryDeviceService.java | 2 +-
.../service/memory/DMIPhysicalMemoryArrayService.java | 2 +-
.../service/peripheral/DMIPortableBatteryService.java | 2 +-
.../dmidecode/service/processor/DMICacheService.java | 2 +-
.../dmidecode/service/processor/DMIProcessorService.java | 2 +-
.../eggy03/dmidecode/service/system/DMISystemService.java | 2 +-
13 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java b/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
index 9285755..eb1e24f 100644
--- a/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
+++ b/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
@@ -5,7 +5,6 @@
*/
package io.github.eggy03.dmidecode.constant;
-import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
@@ -19,13 +18,12 @@
*
Usage example
*
{@code
* // Build a dmidecode command for querying baseboard information
- * String command = DMIType.getCommand(DMIType.BASEBOARD.getValue());
+ * String command = DMIType.getCommandFor(DMIType.BASEBOARD);
* }
*
* @since 0.1.0
*/
@RequiredArgsConstructor
-@Getter
public enum DMIType {
BIOS(0),
@@ -73,7 +71,7 @@ public enum DMIType {
private final int value;
- public static String getCommand(int dmiType){
- return "sudo /usr/sbin/dmidecode --type "+dmiType;
+ public static String getCommandFor(DMIType type){
+ return "sudo /usr/sbin/dmidecode --type " + type.value;
}
}
\ No newline at end of file
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
index b029875..fbe2bae 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
@@ -48,7 +48,7 @@ public class DMIBIOSLanguageService implements OptionalCommonDMIServiceInterface
@Override
public @NonNull Optional get(long timeout) {
return new DMIBIOSLanguageMapper().mapToEntity(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.BIOS_LANGUAGE.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.BIOS_LANGUAGE), timeout),
DMIBIOSLanguage.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
index 847d840..15d3b88 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
@@ -49,7 +49,7 @@ public class DMIBIOSService implements CommonDMIServiceInterface {
@Override
public @NonNull @Unmodifiable List get(long timeout) {
return new DMIBIOSMapper().mapToList(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.BIOS.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.BIOS), timeout),
DMIBIOS.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
index 763855c..832fda6 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
@@ -49,7 +49,7 @@ public class DMIBaseboardService implements OptionalCommonDMIServiceInterface get(long timeout) {
return new DMIBaseboardMapper().mapToEntity(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.BASEBOARD.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.BASEBOARD), timeout),
DMIBaseboard.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java
index d4104dc..09eca67 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIChassisService.java
@@ -48,7 +48,7 @@ public class DMIChassisService implements OptionalCommonDMIServiceInterface get(long timeout) {
return new DMIChassisMapper().mapToEntity(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.CHASSIS.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.CHASSIS), timeout),
DMIChassis.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java
index 521796c..2884229 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIPortConnectorInformationService.java
@@ -50,7 +50,7 @@ public class DMIPortConnectorInformationService implements CommonDMIServiceInter
@Override
public @Unmodifiable @NonNull List get(long timeout) {
return new DMIPortConnectionInformationMapper().mapToList(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.PORT_CONNECTOR.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.PORT_CONNECTOR), timeout),
DMIPortConnectorInformation.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java
index 3d0f8fc..44aa143 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMISystemSlotsService.java
@@ -50,7 +50,7 @@ public class DMISystemSlotsService implements CommonDMIServiceInterface get(long timeout) {
return new DMISystemSlotsMapper().mapToList(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.SYSTEM_SLOTS.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.SYSTEM_SLOTS), timeout),
DMISystemSlots.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java
index 632466e..e939a44 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIMemoryDeviceService.java
@@ -50,7 +50,7 @@ public class DMIMemoryDeviceService implements CommonDMIServiceInterface get(long timeout) {
return new DMIMemoryDeviceMapper().mapToList(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.MEMORY_DEVICE.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.MEMORY_DEVICE), timeout),
DMIMemoryDevice.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java
index 6ca1f73..3f31f4b 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/memory/DMIPhysicalMemoryArrayService.java
@@ -49,7 +49,7 @@ public class DMIPhysicalMemoryArrayService implements OptionalCommonDMIServiceIn
@Override
public @NonNull Optional get(long timeout) {
return new DMIPhysicalMemoryArrayMapper().mapToEntity(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.PHYSICAL_MEMORY_ARRAY.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.PHYSICAL_MEMORY_ARRAY), timeout),
DMIPhysicalMemoryArray.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java b/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java
index c0ca3d6..9d71ed3 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/peripheral/DMIPortableBatteryService.java
@@ -50,7 +50,7 @@ public class DMIPortableBatteryService implements CommonDMIServiceInterface get(long timeout) {
return new DMIPortableBatteryMapper().mapToList(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.PORTABLE_BATTERY.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.PORTABLE_BATTERY), timeout),
DMIPortableBattery.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java
index 9bd5b06..7bd1d00 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMICacheService.java
@@ -50,7 +50,7 @@ public class DMICacheService implements CommonDMIServiceInterface {
@Override
public @Unmodifiable @NonNull List get(long timeout) {
return new DMICacheMapper().mapToList(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.CACHE.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.CACHE), timeout),
DMICache.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
index 2e370f0..4c3f895 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
@@ -49,7 +49,7 @@ public class DMIProcessorService implements CommonDMIServiceInterface get(long timeout) {
return new DMIProcessorMapper().mapToList(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.PROCESSOR.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.PROCESSOR), timeout),
DMIProcessor.class
);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java b/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java
index 068cf0d..0c39c9e 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/system/DMISystemService.java
@@ -50,7 +50,7 @@ public class DMISystemService implements OptionalCommonDMIServiceInterface get(long timeout) {
return new DMISystemMapper().mapToEntity(
- TerminalUtility.executeCommand(DMIType.getCommand(DMIType.SYSTEM.getValue()), timeout),
+ TerminalUtility.executeCommand(DMIType.getCommandFor(DMIType.SYSTEM), timeout),
DMISystem.class
);
}
From 12541f2d67b56d771dea736b0159b0512da66ffb Mon Sep 17 00:00:00 2001
From: Egg-03 <111327101+eggy03@users.noreply.github.com>
Date: Tue, 31 Mar 2026 22:17:31 +0530
Subject: [PATCH 08/19] refactor(mapper): replace Gson with Jackson
- Remove `Gson` dependency from `pom.xml`.
- Replace `Gson` with `Jackson` in `CommonDMIMapper`.
- Update `MockEntityClass` in `CommonDMIMapperTest` to use Jackson annotations and remove Lombok.
---
pom.xml | 6 --
.../dmidecode/mapper/CommonDMIMapper.java | 83 +++++++++----------
.../dmidecode/mapper/CommonDMIMapperTest.java | 75 ++++++++++-------
3 files changed, 83 insertions(+), 81 deletions(-)
diff --git a/pom.xml b/pom.xml
index be014ef..77fde3b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,6 @@
2.12.11.18.42
- 2.13.23.1.11.0.06.0.0
@@ -88,11 +87,6 @@
jackson-databindcompile
Converting the extracted data into JSON internally
- *
Deserializing the JSON into the requested entity class using Gson
+ *
Deserializing the JSON into the requested entity class using Jackson
*
*
* @param the entity type returned by the service implementation
@@ -46,7 +45,7 @@
*/
public interface CommonDMIMapper {
- Gson GSON = new Gson();
+ ObjectMapper jacksonMapper = new ObjectMapper();
/**
* Maps raw {@code dmidecode} output into a single entity of type {@code }.
@@ -91,50 +90,46 @@ public interface CommonDMIMapper {
Map keyValueMap = new LinkedHashMap<>();
- StringBuilder key = new StringBuilder();
- // for single-line values
- Object value = null;
- // for multi-line values
- List
-
- org.projectlombok
- lombok
- ${lombok.version}
- provided
- org.jspecifyjspecify
@@ -163,11 +155,6 @@
${maven.compiler.plugin.version}
-
- org.projectlombok
- lombok
- ${lombok.version}
- org.immutablesvalue
diff --git a/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java b/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
index eb1e24f..599d959 100644
--- a/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
+++ b/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
@@ -5,8 +5,6 @@
*/
package io.github.eggy03.dmidecode.constant;
-import lombok.RequiredArgsConstructor;
-
/**
* Enumeration of DMI types as defined by the
* {@code dmidecode} specification.
@@ -23,7 +21,6 @@
*
* @since 0.1.0
*/
-@RequiredArgsConstructor
public enum DMIType {
BIOS(0),
@@ -71,6 +68,8 @@ public enum DMIType {
private final int value;
+ DMIType(int value){this.value = value;}
+
public static String getCommandFor(DMIType type){
return "sudo /usr/sbin/dmidecode --type " + type.value;
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java b/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
index 63b08a5..e8bee6e 100644
--- a/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
+++ b/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
@@ -5,13 +5,25 @@
*/
package io.github.eggy03.dmidecode.exception;
-import lombok.experimental.StandardException;
-
/**
* Thrown when the terminal fails to execute a command or a script
* @since 0.1.0
*/
-@StandardException
public class TerminalExecutionException extends RuntimeException {
+ @SuppressWarnings("unused")
+ public TerminalExecutionException(String message, Throwable cause){
+ super(message, cause);
+ }
+
+ @SuppressWarnings("unused")
+ public TerminalExecutionException(String message){
+ super(message);
+ }
+
+ @SuppressWarnings("unused")
+ public TerminalExecutionException(Throwable cause){
+ super("Terminal Execution Failure", cause);
+ }
+
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/utility/TerminalUtility.java b/src/main/java/io/github/eggy03/dmidecode/utility/TerminalUtility.java
index 7bfe63f..1777ce6 100644
--- a/src/main/java/io/github/eggy03/dmidecode/utility/TerminalUtility.java
+++ b/src/main/java/io/github/eggy03/dmidecode/utility/TerminalUtility.java
@@ -6,14 +6,14 @@
package io.github.eggy03.dmidecode.utility;
import io.github.eggy03.dmidecode.exception.TerminalExecutionException;
-import lombok.NonNull;
-import lombok.experimental.UtilityClass;
-import lombok.extern.slf4j.Slf4j;
import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.DefaultExecutor;
import org.apache.commons.exec.ExecuteException;
import org.apache.commons.exec.ExecuteWatchdog;
import org.apache.commons.exec.PumpStreamHandler;
+import org.jspecify.annotations.NonNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -26,10 +26,14 @@
*
* @since 0.1.0
*/
-@UtilityClass
-@Slf4j
public class TerminalUtility {
+ private static final Logger log = LoggerFactory.getLogger(TerminalUtility.class);
+
+ private TerminalUtility(){
+ throw new IllegalStateException("Utility Class");
+ }
+
/**
* Launches a standalone terminal session, executes the given command
* and returns the result
@@ -41,7 +45,7 @@ public class TerminalUtility {
* or when the command yields an error, or when the terminal cannot be accessed.
* @throws IllegalArgumentException If the provided timeout is in the negative
*/
- public static String executeCommand(@NonNull String command, long timeoutSeconds) {
+ public static @NonNull String executeCommand(@NonNull String command, long timeoutSeconds) {
if(timeoutSeconds<0)
throw new IllegalArgumentException("Timeout cannot be negative");
From 430442e4f2394afe856c9a1cb4c25fb936416921 Mon Sep 17 00:00:00 2001
From: Egg-03 <111327101+eggy03@users.noreply.github.com>
Date: Sat, 4 Apr 2026 09:02:51 +0530
Subject: [PATCH 12/19] feat(entity): restore entity pretty print
- Restore the `toString()` override for all entity classes. This feature was previously removed during GSON dependency removal.
---
.../eggy03/dmidecode/entity/board/AbstractDMIBIOS.java | 8 ++++++++
.../dmidecode/entity/board/AbstractDMIBIOSLanguage.java | 8 ++++++++
.../dmidecode/entity/board/AbstractDMIBaseboard.java | 8 ++++++++
.../dmidecode/entity/board/AbstractDMIChassis.java | 8 ++++++++
.../board/AbstractDMIPortConnectorInformation.java | 8 ++++++++
.../dmidecode/entity/board/AbstractDMISystemSlots.java | 9 ++++++++-
.../dmidecode/entity/memory/AbstractDMIMemoryDevice.java | 8 ++++++++
.../entity/memory/AbstractDMIPhysicalMemoryArray.java | 8 ++++++++
.../entity/peripheral/AbstractDMIPortableBattery.java | 8 ++++++++
.../dmidecode/entity/processor/AbstractDMICache.java | 8 ++++++++
.../dmidecode/entity/processor/AbstractDMIProcessor.java | 8 ++++++++
.../dmidecode/entity/system/AbstractDMISystem.java | 8 ++++++++
12 files changed, 96 insertions(+), 1 deletion(-)
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOS.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOS.java
index c1e294b..a14054b 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOS.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOS.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
import java.util.List;
@@ -78,4 +79,11 @@ public abstract class AbstractDMIBIOS {
@JsonProperty("Firmware Revision")
@Nullable
public abstract String firmwareRevision();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOSLanguage.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOSLanguage.java
index c8eac69..5334f95 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOSLanguage.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBIOSLanguage.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
import java.util.List;
@@ -49,4 +50,11 @@ public abstract class AbstractDMIBIOSLanguage {
@JsonProperty("Currently Installed Language")
@Nullable
public abstract String currentLanguage();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBaseboard.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBaseboard.java
index beec919..57aa925 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBaseboard.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIBaseboard.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
import java.util.List;
@@ -83,4 +84,11 @@ public abstract class AbstractDMIBaseboard {
@JsonProperty("Contained Object Handles")
@Nullable
public abstract Integer containedObjectHandles();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIChassis.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIChassis.java
index 48cfc1e..18c1045 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIChassis.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIChassis.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
/**
* Immutable representation of system chassis information retrieved via DMI.
@@ -101,4 +102,11 @@ public abstract class AbstractDMIChassis {
@Nullable
public abstract String skuNumber();
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIPortConnectorInformation.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIPortConnectorInformation.java
index 27f1df2..9515e2c 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIPortConnectorInformation.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMIPortConnectorInformation.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
/**
* Immutable representation of port connector information retrieved via DMI.
@@ -61,4 +62,11 @@ public abstract class AbstractDMIPortConnectorInformation {
@Nullable
public abstract String portType();
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
+
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMISystemSlots.java b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMISystemSlots.java
index bd2c922..6b56509 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMISystemSlots.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/board/AbstractDMISystemSlots.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
import java.util.List;
@@ -71,5 +72,11 @@ public abstract class AbstractDMISystemSlots {
@JsonProperty("Bus Address")
@Nullable
public abstract String busAddress();
-
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIMemoryDevice.java b/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIMemoryDevice.java
index 099b975..f9fb19a 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIMemoryDevice.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIMemoryDevice.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
/**
* Immutable representation of memory device information retrieved via DMI.
@@ -170,4 +171,11 @@ public abstract class AbstractDMIMemoryDevice {
@JsonProperty("Logical Size")
@Nullable
public abstract String logicalSize();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIPhysicalMemoryArray.java b/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIPhysicalMemoryArray.java
index 83fe69d..ecd6342 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIPhysicalMemoryArray.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/memory/AbstractDMIPhysicalMemoryArray.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
/**
* Immutable representation of physical memory array information retrieved via DMI.
@@ -65,4 +66,11 @@ public abstract class AbstractDMIPhysicalMemoryArray {
@JsonProperty("Number Of Devices")
@Nullable
public abstract Integer numberOfDevices();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/AbstractDMIPortableBattery.java b/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/AbstractDMIPortableBattery.java
index 06c641a..9ac1895 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/AbstractDMIPortableBattery.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/peripheral/AbstractDMIPortableBattery.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
/**
* Immutable representation of portable battery information retrieved via DMI.
@@ -85,4 +86,11 @@ public abstract class AbstractDMIPortableBattery {
@JsonProperty("OEM-specific Information")
@Nullable
public abstract String oemSpecificInformation();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMICache.java b/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMICache.java
index 73124cc..2087f86 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMICache.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMICache.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
import java.util.List;
@@ -91,4 +92,11 @@ public abstract class AbstractDMICache {
@JsonProperty("Associativity")
@Nullable
public abstract String associativity();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMIProcessor.java b/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMIProcessor.java
index 6e5b7db..0f12107 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMIProcessor.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/processor/AbstractDMIProcessor.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
import java.util.List;
@@ -141,4 +142,11 @@ public abstract class AbstractDMIProcessor {
@JsonProperty("Characteristics")
@Nullable
public abstract List<@Nullable String> characteristics();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/system/AbstractDMISystem.java b/src/main/java/io/github/eggy03/dmidecode/entity/system/AbstractDMISystem.java
index 455df70..d18fe80 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/system/AbstractDMISystem.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/system/AbstractDMISystem.java
@@ -10,6 +10,7 @@
import org.immutables.value.Value;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import tools.jackson.databind.ObjectMapper;
/**
* Immutable representation of system information retrieved via DMI.
@@ -73,4 +74,11 @@ public abstract class AbstractDMISystem {
@JsonProperty("Family")
@Nullable
public abstract String family();
+
+ @Override
+ public String toString() {
+ return new ObjectMapper()
+ .writerWithDefaultPrettyPrinter()
+ .writeValueAsString(this);
+ }
}
From af940478a171c025f070e5023ec04ab45b7769ee Mon Sep 17 00:00:00 2001
From: Egg-03 <111327101+eggy03@users.noreply.github.com>
Date: Sat, 4 Apr 2026 10:37:46 +0530
Subject: [PATCH 13/19] refactor(annotations): rename `ImmutableStyle`
- `ImmutableStyle` has been renamed to `ImmutableEntityStyle` and updated references.
- Added documentation to `ImmutableEntityStyle`.
---
...mutableStyle.java => ImmutableEntityStyle.java} | 14 +++++++++++++-
.../dmidecode/entity/board/AbstractDMIBIOS.java | 4 ++--
.../entity/board/AbstractDMIBIOSLanguage.java | 4 ++--
.../entity/board/AbstractDMIBaseboard.java | 4 ++--
.../dmidecode/entity/board/AbstractDMIChassis.java | 4 ++--
.../board/AbstractDMIPortConnectorInformation.java | 4 ++--
.../entity/board/AbstractDMISystemSlots.java | 4 ++--
.../entity/memory/AbstractDMIMemoryDevice.java | 4 ++--
.../memory/AbstractDMIPhysicalMemoryArray.java | 4 ++--
.../peripheral/AbstractDMIPortableBattery.java | 4 ++--
.../entity/processor/AbstractDMICache.java | 4 ++--
.../entity/processor/AbstractDMIProcessor.java | 4 ++--
.../dmidecode/entity/system/AbstractDMISystem.java | 4 ++--
13 files changed, 37 insertions(+), 25 deletions(-)
rename src/main/java/io/github/eggy03/dmidecode/annotation/{ImmutableStyle.java => ImmutableEntityStyle.java} (70%)
diff --git a/src/main/java/io/github/eggy03/dmidecode/annotation/ImmutableStyle.java b/src/main/java/io/github/eggy03/dmidecode/annotation/ImmutableEntityStyle.java
similarity index 70%
rename from src/main/java/io/github/eggy03/dmidecode/annotation/ImmutableStyle.java
rename to src/main/java/io/github/eggy03/dmidecode/annotation/ImmutableEntityStyle.java
index 47e9441..afb3b4b 100644
--- a/src/main/java/io/github/eggy03/dmidecode/annotation/ImmutableStyle.java
+++ b/src/main/java/io/github/eggy03/dmidecode/annotation/ImmutableEntityStyle.java
@@ -8,6 +8,18 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+/**
+ *
+ * A custom annotation that is intended to be applied with {@link Value.Immutable},
+ * on {@link io.github.eggy03.dmidecode.entity} package classes.
+ *
+ *
+ * It modifies the naming and structural style of the generated immutable implementations via {@link Value.Style}
+ * and contains {@link JsonSerialize} for automatic Jackson integration.
+ *
- * A custom annotation that is intended to be applied with {@link Value.Immutable},
- * on {@link io.github.eggy03.dmidecode.entity} package classes.
+ * A custom annotation that is intended to be applied with {@link Value.Immutable},
+ * on {@link io.github.eggy03.dmidecode.entity} package classes.
*
*
- * It modifies the naming and structural style of the generated immutable implementations via {@link Value.Style}
- * and contains {@link JsonSerialize} for automatic Jackson integration.
+ * It modifies the naming and structural style of the generated immutable implementations via {@link Value.Style}
+ * and contains {@link JsonSerialize} for automatic Jackson integration.
*
*
* @since 0.2.0
@@ -31,4 +31,5 @@
// Generated builders will have attributes annotated with @JsonProperty so deserialization will work properly.
defaults = @Value.Immutable(copy = true) // Enable copy methods
)
-public @interface ImmutableEntityStyle {}
+public @interface ImmutableEntityStyle {
+}
diff --git a/src/main/java/io/github/eggy03/dmidecode/annotation/Unmodifiable.java b/src/main/java/io/github/eggy03/dmidecode/annotation/Unmodifiable.java
index e4f11c8..6ffe3d2 100644
--- a/src/main/java/io/github/eggy03/dmidecode/annotation/Unmodifiable.java
+++ b/src/main/java/io/github/eggy03/dmidecode/annotation/Unmodifiable.java
@@ -8,13 +8,13 @@
/**
*
- * Indicates that the underlying `Collection` or `Map` is unmodifiable.
- * Any attempts to mutate such a collection or map may result in exceptions being
- * thrown, or no result at all.
+ * Indicates that the underlying `Collection` or `Map` is unmodifiable.
+ * Any attempts to mutate such a collection or map may result in exceptions being
+ * thrown, or no result at all.
*
*
- * The referenced objects within the collection or map may still be mutable, depending on
- * their implementation.
+ * The referenced objects within the collection or map may still be mutable, depending on
+ * their implementation.
*
- * When marked on a method (or a constructor), it serves as an indication that
- * the method's behavior depends on unstable and or environment-specific logic
- * and may break without notice.
+ * When marked on a method (or a constructor), it serves as an indication that
+ * the method's behavior depends on unstable and or environment-specific logic
+ * and may break without notice.
*
*
- * A method annotated with {@code @FragileMethod} should not be used in production.
- * However, if usage in production is unavoidable, any method or constructor that
- * invokes a fragile method in its definition should be annotated with {@code @InvokesFragileMethod}.
+ * A method annotated with {@code @FragileMethod} should not be used in production.
+ * However, if usage in production is unavoidable, any method or constructor that
+ * invokes a fragile method in its definition should be annotated with {@code @InvokesFragileMethod}.
*
*
- * This annotation is for documentation purposes only.
+ * This annotation is for documentation purposes only.
*
- * When marked on a method (or a constructor), it indicates that annotated method or constructor
- * has a definition that invokes a method or a constructor annotated with {@code FragileMethod}
+ * When marked on a method (or a constructor), it indicates that annotated method or constructor
+ * has a definition that invokes a method or a constructor annotated with {@code FragileMethod}
*
*
- * This annotation is for documentation purposes only.
+ * This annotation is for documentation purposes only.
*
*
- * @since 0.2.0
* @see FragileMethod
+ * @since 0.2.0
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
diff --git a/src/main/java/io/github/eggy03/dmidecode/annotation/fragility/MethodType.java b/src/main/java/io/github/eggy03/dmidecode/annotation/fragility/MethodType.java
index 1dc4181..08a227a 100644
--- a/src/main/java/io/github/eggy03/dmidecode/annotation/fragility/MethodType.java
+++ b/src/main/java/io/github/eggy03/dmidecode/annotation/fragility/MethodType.java
@@ -3,9 +3,9 @@
/**
* Enum to classify the type of method that is marked as fragile
*
- * @since 0.2.0
* @see FragileMethod
* @see InvokesFragileMethod
+ * @since 0.2.0
*/
public enum MethodType {
diff --git a/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java b/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
index 599d959..64dc320 100644
--- a/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
+++ b/src/main/java/io/github/eggy03/dmidecode/constant/DMIType.java
@@ -65,12 +65,14 @@ public enum DMIType {
POWER_SUPPLY(39),
ADDITIONAL_INFORMATION(40),
ONBOARD_DEVICE(41);
-
+
private final int value;
- DMIType(int value){this.value = value;}
+ DMIType(int value) {
+ this.value = value;
+ }
- public static String getCommandFor(DMIType type){
+ public static String getCommandFor(DMIType type) {
return "sudo /usr/sbin/dmidecode --type " + type.value;
}
}
\ No newline at end of file
diff --git a/src/main/java/io/github/eggy03/dmidecode/entity/system/AbstractDMISystem.java b/src/main/java/io/github/eggy03/dmidecode/entity/system/AbstractDMISystem.java
index 047a54f..91081e8 100644
--- a/src/main/java/io/github/eggy03/dmidecode/entity/system/AbstractDMISystem.java
+++ b/src/main/java/io/github/eggy03/dmidecode/entity/system/AbstractDMISystem.java
@@ -42,7 +42,7 @@
@ImmutableEntityStyle
@NullMarked
public abstract class AbstractDMISystem {
-
+
@JsonProperty("Manufacturer")
@Nullable
public abstract String manufacturer();
diff --git a/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java b/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
index e8bee6e..3a7597f 100644
--- a/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
+++ b/src/main/java/io/github/eggy03/dmidecode/exception/TerminalExecutionException.java
@@ -7,22 +7,23 @@
/**
* Thrown when the terminal fails to execute a command or a script
+ *
* @since 0.1.0
*/
public class TerminalExecutionException extends RuntimeException {
@SuppressWarnings("unused")
- public TerminalExecutionException(String message, Throwable cause){
+ public TerminalExecutionException(String message, Throwable cause) {
super(message, cause);
}
@SuppressWarnings("unused")
- public TerminalExecutionException(String message){
+ public TerminalExecutionException(String message) {
super(message);
}
@SuppressWarnings("unused")
- public TerminalExecutionException(Throwable cause){
+ public TerminalExecutionException(Throwable cause) {
super("Terminal Execution Failure", cause);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java b/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
index 79f3054..94e0b2e 100644
--- a/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
+++ b/src/main/java/io/github/eggy03/dmidecode/mapper/CommonDMIMapper.java
@@ -79,10 +79,11 @@ public interface CommonDMIMapper {
* 64-bit capable
* Multi-Core
*
- * @param rawDMIData the raw {@code dmidecode} output
+ *
+ * @param rawDMIData the raw {@code dmidecode} output
* @param mappableEntityClass the target entity class
* @return an {@link Optional} containing the mapped entity, or empty if
- * no mappable data is found
+ * no mappable data is found
* @since 0.1.0
*/
@FragileMethod(
@@ -93,7 +94,7 @@ public interface CommonDMIMapper {
)
default @NonNull Optional mapToEntity(@Nullable String rawDMIData, @NonNull Class mappableEntityClass) {
- if(rawDMIData==null)
+ if (rawDMIData == null)
return Optional.empty();
Map keyValueMap = new LinkedHashMap<>();
@@ -107,7 +108,7 @@ public interface CommonDMIMapper {
if (currentLine.contains(":")) {
// store the previous key and value if present, indicated by a key of length greater than 0
- if (key!=null && !key.isEmpty()) {
+ if (key != null && !key.isEmpty()) {
// if the value has multi lines, insert them or else insert the single line value
keyValueMap.put(key, !multiLineValues.isEmpty() ? new ArrayList<>(multiLineValues) : singleLineValue);
}
@@ -132,7 +133,7 @@ public interface CommonDMIMapper {
}
}
// Store the last key/value pair
- if (key!=null && !key.isEmpty()) {
+ if (key != null && !key.isEmpty()) {
keyValueMap.put(key, !multiLineValues.isEmpty() ? new ArrayList<>(multiLineValues) : singleLineValue);
}
@@ -182,7 +183,7 @@ public interface CommonDMIMapper {
* Associativity: 16-way Set-associative
*
*
- * @param rawDMIData the raw {@code dmidecode} output
+ * @param rawDMIData the raw {@code dmidecode} output
* @param mappableEntityClass the target entity class
* @return a non-null list of mapped entities
* @since 0.1.0
@@ -195,7 +196,7 @@ public interface CommonDMIMapper {
)
default @NonNull @Unmodifiable List mapToList(@Nullable String rawDMIData, @NonNull Class mappableEntityClass) {
- if(rawDMIData==null)
+ if (rawDMIData == null)
return Collections.emptyList();
List entityList = new ArrayList<>();
@@ -214,7 +215,7 @@ public interface CommonDMIMapper {
if (currentLine.contains(":")) {
// store the previous key and value if present, indicated by a key of length greater than 0
- if (key!=null && !key.isEmpty()) {
+ if (key != null && !key.isEmpty()) {
// if the value has multi lines, insert them or else insert the single line value
keyValueMap.put(key, !multiLineValues.isEmpty() ? new ArrayList<>(multiLineValues) : singleLineValue);
}
@@ -239,7 +240,7 @@ public interface CommonDMIMapper {
}
}
// Store the last key/value pair in this DMI block
- if (key!=null && !key.isEmpty()) {
+ if (key != null && !key.isEmpty()) {
keyValueMap.put(key, !multiLineValues.isEmpty() ? new ArrayList<>(multiLineValues) : singleLineValue);
}
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/CommonDMIServiceInterface.java b/src/main/java/io/github/eggy03/dmidecode/service/CommonDMIServiceInterface.java
index 5397e7e..7c02c33 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/CommonDMIServiceInterface.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/CommonDMIServiceInterface.java
@@ -17,9 +17,8 @@
*
*
* @param the entity type returned by the service implementation
- *
- * @since 0.1.0
* @see OptionalCommonDMIServiceInterface
+ * @since 0.1.0
*/
public interface CommonDMIServiceInterface {
@@ -31,7 +30,6 @@ public interface CommonDMIServiceInterface {
* {@code dmidecode} command to complete before
* terminating the process
* @return a {@link List} of entities of type {@code } defined by the caller
- *
* @since 0.1.0
*/
List get(long timeout);
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/OptionalCommonDMIServiceInterface.java b/src/main/java/io/github/eggy03/dmidecode/service/OptionalCommonDMIServiceInterface.java
index ab3cb9f..fd68207 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/OptionalCommonDMIServiceInterface.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/OptionalCommonDMIServiceInterface.java
@@ -17,9 +17,8 @@
*
*
* @param the entity type returned by the service implementation
- *
- * @since 0.1.0
* @see CommonDMIServiceInterface
+ * @since 0.1.0
*/
public interface OptionalCommonDMIServiceInterface {
@@ -32,9 +31,8 @@ public interface OptionalCommonDMIServiceInterface {
* {@code dmidecode} command to complete before
* terminating the process
* @return an {@link Optional} containing the entity of type {@code }
- * if present, or {@link Optional#empty()} if the information
- * is unavailable or not reported by the system
- *
+ * if present, or {@link Optional#empty()} if the information
+ * is unavailable or not reported by the system
* @since 0.1.0
*/
Optional get(long timeout);
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
index 4287733..9aa263e 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSLanguageService.java
@@ -44,8 +44,7 @@ public class DMIBIOSLanguageService implements OptionalCommonDMIServiceInterface
* @param timeout the maximum time (in seconds) to wait for the {@code dmidecode}
* command to complete before terminating the process
* @return an {@link Optional} containing {@link DMIBIOSLanguage} information if present,
- * or {@link Optional#empty()} if no BIOS language entry is detected
- *
+ * or {@link Optional#empty()} if no BIOS language entry is detected
* @since 0.1.0
*/
@Override
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
index 594cd09..83bdf75 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBIOSService.java
@@ -45,8 +45,7 @@ public class DMIBIOSService implements CommonDMIServiceInterface {
* @param timeout the maximum time (in seconds) to wait for the {@code dmidecode}
* command to complete before terminating the process
* @return a list of {@link DMIBIOS} objects representing the system BIOS entries.
- * Returns an empty list if no BIOS entries are detected.
- *
+ * Returns an empty list if no BIOS entries are detected.
* @since 0.1.0
*/
@Override
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
index 51a3c33..71d728b 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/board/DMIBaseboardService.java
@@ -45,8 +45,7 @@ public class DMIBaseboardService implements OptionalCommonDMIServiceInterface {
* @param timeout the maximum time (in seconds) to wait for the {@code dmidecode}
* command to complete before terminating the process
* @return a list of {@link DMICache} objects representing
- * the system cache entries.
- * Returns an empty list if no cache entries are detected.
- *
+ * the system cache entries.
+ * Returns an empty list if no cache entries are detected.
* @since 0.1.0
*/
@Override
diff --git a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
index 4c3f895..7559a41 100644
--- a/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
+++ b/src/main/java/io/github/eggy03/dmidecode/service/processor/DMIProcessorService.java
@@ -42,8 +42,7 @@ public class DMIProcessorService implements CommonDMIServiceInterface
Date: Sat, 4 Apr 2026 23:28:06 +0530
Subject: [PATCH 16/19] docs: add implementation status table
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
---
README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/README.md b/README.md
index d617b51..d119e80 100644
--- a/README.md
+++ b/README.md
@@ -53,5 +53,53 @@ public class ProcessorExample {
}
}
```
+
+# Implementation Status
+
+| Number | Type | Status |
+|--------|----------------------------------|-------------|
+| 0 | BIOS | Implemented |
+| 1 | SYSTEM | Implemented |
+| 2 | BASEBOARD | Implemented |
+| 3 | CHASSIS | Implemented |
+| 4 | PROCESSOR | Implemented |
+| 5 | MEMORY_CONTROLLER | Pending |
+| 6 | MEMORY_MODULE | Pending |
+| 7 | CACHE | Implemented |
+| 8 | PORT_CONNECTOR | Implemented |
+| 9 | SYSTEM_SLOTS | Implemented |
+| 10 | ONBOARD_DEVICES | Pending |
+| 11 | OEM_SETTINGS | Pending |
+| 12 | SYSTEM_CONFIGURATION_OPTIONS | Pending |
+| 13 | BIOS_LANGUAGE | Implemented |
+| 14 | GROUP_ASSOCIATIONS | Pending |
+| 15 | SYSTEM_EVENT_LOG | Pending |
+| 16 | PHYSICAL_MEMORY_ARRAY | Implemented |
+| 17 | MEMORY_DEVICE | Implemented |
+| 18 | THIRTY_TWO_BIT_MEMORY_ERROR | Pending |
+| 19 | MEMORY_ARRAY_MAPPED_ADDRESS | Pending |
+| 20 | MEMORY_DEVICE_MAPPED_ADDRESS | Pending |
+| 21 | BUILT_IN_POINTING_DEVICE | Pending |
+| 22 | PORTABLE_BATTERY | Implemented |
+| 23 | SYSTEM_RESET | Pending |
+| 24 | HARDWARE_SECURITY | Pending |
+| 25 | SYSTEM_POWER_CONTROLS | Pending |
+| 26 | VOLTAGE_PROBE | Pending |
+| 27 | COOLING_DEVICE | Pending |
+| 28 | TEMPERATURE_PROBE | Pending |
+| 29 | ELECTRICAL_CURRENT_PROBE | Pending |
+| 30 | OUT_OF_BAND_REMOTE_ACCESS | Pending |
+| 31 | BOOT_INTEGRITY_SERVICES | Pending |
+| 32 | SYSTEM_BOOT | Pending |
+| 33 | SIXTY_FOUR_BIT_MEMORY_ERROR | Pending |
+| 34 | MANAGEMENT_DEVICE | Pending |
+| 35 | MANAGEMENT_DEVICE_COMPONENT | Pending |
+| 36 | MANAGEMENT_DEVICE_THRESHOLD_DATA | Pending |
+| 37 | MEMORY_CHANNEL | Pending |
+| 38 | IPMI_DEVICE | Pending |
+| 39 | POWER_SUPPLY | Pending |
+| 40 | ADDITIONAL_INFORMATION | Pending |
+| 41 | ONBOARD_DEVICE | Pending |
+
# License
This project is licensed under the [MIT License](/LICENSE).
From 4a729dc751072869a0926b0c85d866c381e2fd17 Mon Sep 17 00:00:00 2001
From: Egg-03 <111327101+eggy03@users.noreply.github.com>
Date: Sun, 5 Apr 2026 22:08:57 +0530
Subject: [PATCH 17/19] build: remove SNAPSHOT from project version
- prepare for the official `0.2.0` release
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f7d3a46..e4f0560 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
io.github.eggy03dmidecode4j
- 0.2.0-SNAPSHOT
+ 0.2.08
From a66a1750d0f4bce39511cc433e4882e521d9f5d4 Mon Sep 17 00:00:00 2001
From: Egg-03 <111327101+eggy03@users.noreply.github.com>
Date: Sun, 5 Apr 2026 22:10:14 +0530
Subject: [PATCH 18/19] docs: update for version `0.2.0` release
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
---
CHANGELOG.md | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 110 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e81cb95..822cd40 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,9 +7,118 @@ commits and PRs that contributed to each of the releases.
This project tries its best to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+The following headings may be used while categorizing the list of changes made in each version:
+
+- New Features
+- Removed Features
+- Bug Fixes
+- Non-Breaking Changes
+- Breaking Changes
+- Test Changes
+- Dependency Updates
+- Documentation
+- Known Issues
+
+## [0.2.0] - April 06, 2026
+
+This update introduces several breaking changes and is not backwards compatible with the previous versions.
+For a complete list of changes, see the enclosed [PR](https://github.com/eggy03/dmidecode4j/pull/2)
+
+### Non-Breaking Changes
+
+- Replaced the underlying mapper from GSON to Jackson
+- Replaced `DMIType.getCommand(int)` with `DMIType.getCommandFor(DMIType)` in `DMIType.java`.
+- Updated all service classes to use the new `DMIType.getCommandFor()` method.
+
+### Breaking Changes
+
+- Removed all traces of `Lombok` and replaced them with `Immutables` equivalents for deep immutability of entity
+ classes.
+ As a result, the builder methods now have a slightly different syntax. The remaining changes involve writing more
+ boilerplate code to make up for removal of Lombok's annotations but are non-breaking in nature.
+ The complete list of changes can be found in the enclosed PR.
+
+During Lombok, the syntax for an entity builder was as follows:
+
+```java
+import io.github.eggy03.dmidecode.entity.processor.DMIProcessor;
+
+void main() {
+ // building a new entity using builder
+ DMIProcessor processor = DMIProcessor.Builder.build();
+
+
+ DMIProcessor processorTwo = processor.toBuilder().build();
+
+ // accessing fields
+ processor.getCurrentSpeed();
+}
+
+
+```
+
+With Immutables, the new syntax is:
+
+```java
+import io.github.eggy03.dmidecode.entity.processor.DMIProcessor;
+
+@SuppressWarnings("all")
+void main() {
+
+ // building a new entity using builder
+ DMIProcessor processor = new DMIProcessor.Builder().build();
+
+ // updating a built entity
+ DMIProcessor processorTwo = processor.withProperties();
+
+ // accessing fields
+ processor.currentSpeed();
+}
+```
+
+- All entities have been converted to their abstract forms.
+ Immutables handles their concrete implementation during compile time.
+ This is technically not a breaking change since the generated implementations retain their `pre-0.2.0` names
+
+- `CommonDMIMapper#mapToList` returns an unmodifiable list using `Collections.unmodifiableList`
+
+### Test Changes
+
+- Updated corresponding entity tests to use the `Immutables` builder pattern
+- Updated `MockEntityClass` in `CommonDMIMapperTest` to use Jackson's `@JsonProperty` as a replacement for GSON's
+ `@SerializedValue`.
+- Removed all traces of Lombok from the tests.
+
+### Dependency Updates
+
+- Added Jackson and Immutables BOMs and dependencies
+- Removed GSON and Lombok
+- Updated source generation plugins to support packing Immutables generated code in `sources.jar`
+- Updated `maven-compiler-plugin` from `3.14.1` to `3.15.0`
+- Updated `maven-surefire-plugin` from `3.5.4` to `3.5.5`
+- Updated `central-publishing-maven-plugin` from `0.9.0` to `0.10.0`
+- Updated `assertj-core` from `3.27.6` to `3.27.7`
+
+### Documentation
+
+- Replaced JetBrains `@NotNull` and `@Nullable` and Lombok's `@NonNull` annotations with Jspecify equivalents.
+ For `@Unmodifiable`, an equivalent custom `@Unmodifiable` annotation has been introduced.
+
+- Introduced two new annotations `@FragileMethod` and `@InvokesFragileMethod`.
+ These two annotations when used, document that a method or a constructor's implementation is fragile in nature
+ and may break in the future.
+
+- Updated Javadocs to reflect the Immutable builder style examples
+- Removed `@author` tag from Javadocs
+- Updated developer mail in `pom.xml`
+- Corrected `project.license.url` branch from `main` to `master` in `pom.xml`
+- Added an implementation status table in `README.md`
+
## [0.1.1] - January 14, 2026
-- `DMIProcessorService` now returns a list of `DMIProcessor` objects instead of an `Optional` object 0a0ea2306cbe2bf6f15bf14190c28be58f609f55
+## Breaking Changes
+
+- `DMIProcessorService` now returns a list of `DMIProcessor` objects instead of an `Optional` instance
## [0.1.0] - January 13, 2026
From 05ebafd128c6b2cbd6c09b44c5fc86774b4c207b Mon Sep 17 00:00:00 2001
From: Egg-03 <111327101+eggy03@users.noreply.github.com>
Date: Mon, 6 Apr 2026 09:16:49 +0530
Subject: [PATCH 19/19] ci: add a PR template
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
---
.github/pull_request_template.md | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 .github/pull_request_template.md
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..81b49e6
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,19 @@
+## **Description**
+
+Provide a clear and concise description of the changes in this PR.
+What problem does it solve? What does it add or improve?
+
+## **Type of Change**
+
+Keep all that apply:
+
+- Bug fix
+- New feature
+- Documentation update
+- Refactor
+- Tests
+- Other (please describe):
+
+## **Related Issues**
+
+If this PR closes or relates to an existing issue, link it here:
\ No newline at end of file