mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpiutil] Add serializable marker interfaces (#6060)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.util;
|
||||
|
||||
/** Marker interface to indicate a class is serializable using WPI serialization methods. */
|
||||
public interface WPISerializable<T> {}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.util.protobuf;
|
||||
|
||||
import edu.wpi.first.util.WPISerializable;
|
||||
|
||||
/**
|
||||
* Marker interface to indicate a class is serializable using Protobuf serialization.
|
||||
*
|
||||
* <p>While this cannot be enforced by the interface, any class implementing this interface should
|
||||
* provide a public final static `proto` member variable.
|
||||
*/
|
||||
public interface ProtobufSerializable<T> extends WPISerializable<T> {}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.util.struct;
|
||||
|
||||
import edu.wpi.first.util.WPISerializable;
|
||||
|
||||
/**
|
||||
* Marker interface to indicate a class is serializable using Struct serialization.
|
||||
*
|
||||
* <p>While this cannot be enforced by the interface, any class implementing this interface should
|
||||
* provide a public final static `struct` member variable.
|
||||
*/
|
||||
public interface StructSerializable<T> extends WPISerializable<T> {}
|
||||
Reference in New Issue
Block a user