forked from wpilibsuite/allwpilib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wpiutil] Add serializable marker interfaces
- Loading branch information
1 parent
f029841
commit 155f62f
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
wpiutil/src/main/java/edu/wpi/first/util/WPISerializable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> {} |
15 changes: 15 additions & 0 deletions
15
wpiutil/src/main/java/edu/wpi/first/util/protobuf/ProtobufSerializable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> {} |
15 changes: 15 additions & 0 deletions
15
wpiutil/src/main/java/edu/wpi/first/util/struct/StructSerializable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> {} |