refactor: mark ReflectMapUtil as deprecated
This utility class is no longer maintained and will be removed in a future release. If you still need to use `ReflectMapUtil`, please stick to the last available version (2.2.0).
This commit is contained in:
@@ -33,27 +33,27 @@ import java.util.Map;
|
|||||||
* as maps for serialization, deserialization, or other purposes, and where the structure of the
|
* as maps for serialization, deserialization, or other purposes, and where the structure of the
|
||||||
* objects is not known at compile time.
|
* objects is not known at compile time.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p><b>Example usage:</b></p>
|
* <p><b>Example usage:</b></p>
|
||||||
* <pre>
|
* <pre>
|
||||||
* {@code
|
* {@code
|
||||||
* public class User {
|
* public class User {
|
||||||
* private String name;
|
* private String name;
|
||||||
* private int age;
|
* private int age;
|
||||||
*
|
*
|
||||||
* // getters and setters
|
* // getters and setters
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* public class Example {
|
* public class Example {
|
||||||
* public static void main(String[] args) throws IllegalAccessException {
|
* public static void main(String[] args) throws IllegalAccessException {
|
||||||
* User user = new User();
|
* User user = new User();
|
||||||
* user.setName("John");
|
* user.setName("John");
|
||||||
* user.setAge(30);
|
* user.setAge(30);
|
||||||
*
|
*
|
||||||
* // Convert object to map
|
* // Convert object to map
|
||||||
* Map<String, Object> userMap = ReflectMapUtil.objectToMap(user);
|
* Map<String, Object> userMap = ReflectMapUtil.objectToMap(user);
|
||||||
* System.out.println(userMap); // Output: {name=John, age=30}
|
* System.out.println(userMap); // Output: {name=John, age=30}
|
||||||
*
|
*
|
||||||
* // Convert map to object
|
* // Convert map to object
|
||||||
* User newUser = ReflectMapUtil.mapToObject(userMap, User.class);
|
* User newUser = ReflectMapUtil.mapToObject(userMap, User.class);
|
||||||
* System.out.println(newUser.getName()); // Output: John
|
* System.out.println(newUser.getName()); // Output: John
|
||||||
@@ -66,7 +66,10 @@ import java.util.Map;
|
|||||||
* @author zihluwang
|
* @author zihluwang
|
||||||
* @version 1.4.2
|
* @version 1.4.2
|
||||||
* @since 1.4.2
|
* @since 1.4.2
|
||||||
|
* @deprecated This utility class is no longer maintained and will be removed in a future release. If you still need to
|
||||||
|
* use {@link ReflectMapUtil}, please stick to the last available version (2.2.0).
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true, since = "2.2.0")
|
||||||
public final class ReflectMapUtil {
|
public final class ReflectMapUtil {
|
||||||
|
|
||||||
private final static Logger log = LoggerFactory.getLogger(ReflectMapUtil.class);
|
private final static Logger log = LoggerFactory.getLogger(ReflectMapUtil.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user