From 5641ee52e627ac6e75ac66d58c5a6fcedc2f4551 Mon Sep 17 00:00:00 2001 From: Joseph Eng Date: Sun, 7 Jul 2024 20:37:28 -0700 Subject: [PATCH] Remove Protobuf.getNested() --- .../wpi/first/math/geometry/proto/Ellipse2dProto.java | 5 ----- .../edu/wpi/first/math/geometry/proto/Pose2dProto.java | 5 ----- .../edu/wpi/first/math/geometry/proto/Pose3dProto.java | 5 ----- .../wpi/first/math/geometry/proto/Rectangle2dProto.java | 5 ----- .../wpi/first/math/geometry/proto/Rotation3dProto.java | 5 ----- .../wpi/first/math/geometry/proto/Transform2dProto.java | 5 ----- .../wpi/first/math/geometry/proto/Transform3dProto.java | 5 ----- .../kinematics/proto/MecanumDriveKinematicsProto.java | 5 ----- .../math/kinematics/proto/SwerveModulePositionProto.java | 5 ----- .../math/kinematics/proto/SwerveModuleStateProto.java | 5 ----- .../wpi/first/math/trajectory/proto/TrajectoryProto.java | 5 ----- .../math/trajectory/proto/TrajectoryStateProto.java | 5 ----- .../main/java/edu/wpi/first/util/protobuf/Protobuf.java | 9 --------- 13 files changed, 69 deletions(-) diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Ellipse2dProto.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Ellipse2dProto.java index 587f0e65d0a..8fd99359d9d 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Ellipse2dProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Ellipse2dProto.java @@ -21,11 +21,6 @@ public Descriptor getDescriptor() { return ProtobufEllipse2d.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Pose2d.proto}; - } - @Override public ProtobufEllipse2d createMessage() { return ProtobufEllipse2d.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Pose2dProto.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Pose2dProto.java index 9dcfb34f8a6..4c0098409ce 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Pose2dProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Pose2dProto.java @@ -22,11 +22,6 @@ public Descriptor getDescriptor() { return ProtobufPose2d.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Translation2d.proto, Rotation2d.proto}; - } - @Override public ProtobufPose2d createMessage() { return ProtobufPose2d.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Pose3dProto.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Pose3dProto.java index d908a46f948..671f2b83cc8 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Pose3dProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Pose3dProto.java @@ -22,11 +22,6 @@ public Descriptor getDescriptor() { return ProtobufPose3d.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Translation3d.proto, Rotation3d.proto}; - } - @Override public ProtobufPose3d createMessage() { return ProtobufPose3d.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Rectangle2dProto.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Rectangle2dProto.java index 4876d1e26a2..f730b1671f0 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Rectangle2dProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Rectangle2dProto.java @@ -21,11 +21,6 @@ public Descriptor getDescriptor() { return ProtobufRectangle2d.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Pose2d.proto}; - } - @Override public ProtobufRectangle2d createMessage() { return ProtobufRectangle2d.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Rotation3dProto.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Rotation3dProto.java index 28ace95503c..af841550d0b 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Rotation3dProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Rotation3dProto.java @@ -21,11 +21,6 @@ public Descriptor getDescriptor() { return ProtobufRotation3d.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Quaternion.proto}; - } - @Override public ProtobufRotation3d createMessage() { return ProtobufRotation3d.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Transform2dProto.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Transform2dProto.java index 8714a7044b1..5536ba4c164 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Transform2dProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Transform2dProto.java @@ -22,11 +22,6 @@ public Descriptor getDescriptor() { return ProtobufTransform2d.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Translation2d.proto, Rotation2d.proto}; - } - @Override public ProtobufTransform2d createMessage() { return ProtobufTransform2d.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Transform3dProto.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Transform3dProto.java index b63de6794e0..d824ce6ebcb 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Transform3dProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/proto/Transform3dProto.java @@ -22,11 +22,6 @@ public Descriptor getDescriptor() { return ProtobufTransform3d.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Translation3d.proto, Rotation3d.proto}; - } - @Override public ProtobufTransform3d createMessage() { return ProtobufTransform3d.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/MecanumDriveKinematicsProto.java b/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/MecanumDriveKinematicsProto.java index f5b8f3bdfb0..504b8f85674 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/MecanumDriveKinematicsProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/MecanumDriveKinematicsProto.java @@ -22,11 +22,6 @@ public Descriptor getDescriptor() { return ProtobufMecanumDriveKinematics.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Translation2d.proto}; - } - @Override public ProtobufMecanumDriveKinematics createMessage() { return ProtobufMecanumDriveKinematics.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/SwerveModulePositionProto.java b/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/SwerveModulePositionProto.java index fe5ec5fc661..97cadf28c3a 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/SwerveModulePositionProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/SwerveModulePositionProto.java @@ -22,11 +22,6 @@ public Descriptor getDescriptor() { return ProtobufSwerveModulePosition.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Rotation2d.proto}; - } - @Override public ProtobufSwerveModulePosition createMessage() { return ProtobufSwerveModulePosition.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/SwerveModuleStateProto.java b/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/SwerveModuleStateProto.java index dc30f91117b..cccff4d5910 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/SwerveModuleStateProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/kinematics/proto/SwerveModuleStateProto.java @@ -22,11 +22,6 @@ public Descriptor getDescriptor() { return ProtobufSwerveModuleState.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Rotation2d.proto}; - } - @Override public ProtobufSwerveModuleState createMessage() { return ProtobufSwerveModuleState.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/trajectory/proto/TrajectoryProto.java b/wpimath/src/main/java/edu/wpi/first/math/trajectory/proto/TrajectoryProto.java index 92e5ac7d2cd..10db1ab47e2 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/trajectory/proto/TrajectoryProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/trajectory/proto/TrajectoryProto.java @@ -22,11 +22,6 @@ public Descriptor getDescriptor() { return ProtobufTrajectory.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Trajectory.State.proto}; - } - @Override public ProtobufTrajectory createMessage() { return ProtobufTrajectory.newInstance(); diff --git a/wpimath/src/main/java/edu/wpi/first/math/trajectory/proto/TrajectoryStateProto.java b/wpimath/src/main/java/edu/wpi/first/math/trajectory/proto/TrajectoryStateProto.java index e8900bfbd7b..204c814db1b 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/trajectory/proto/TrajectoryStateProto.java +++ b/wpimath/src/main/java/edu/wpi/first/math/trajectory/proto/TrajectoryStateProto.java @@ -21,11 +21,6 @@ public Descriptor getDescriptor() { return ProtobufTrajectoryState.getDescriptor(); } - @Override - public Protobuf[] getNested() { - return new Protobuf[] {Pose2d.proto}; - } - @Override public ProtobufTrajectoryState createMessage() { return ProtobufTrajectoryState.newInstance(); diff --git a/wpiutil/src/main/java/edu/wpi/first/util/protobuf/Protobuf.java b/wpiutil/src/main/java/edu/wpi/first/util/protobuf/Protobuf.java index 4501ebc6784..f4148399003 100644 --- a/wpiutil/src/main/java/edu/wpi/first/util/protobuf/Protobuf.java +++ b/wpiutil/src/main/java/edu/wpi/first/util/protobuf/Protobuf.java @@ -48,15 +48,6 @@ default String getTypeString() { */ Descriptor getDescriptor(); - /** - * Gets the list of protobuf types referenced by this protobuf. - * - * @return list of protobuf types - */ - default Protobuf[] getNested() { - return new Protobuf[] {}; - } - /** * Creates protobuf message. *