You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tsfile.apache.org by ji...@apache.org on 2026/01/29 09:42:00 UTC
(tsfile) branch add_must_override created (now a1e6da2f)
This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a change to branch add_must_override
in repository https://gitbox.apache.org/repos/asf/tsfile.git
at a1e6da2f add must override
This branch includes the following new commits:
new a1e6da2f add must override
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(tsfile) 01/01: add must override
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch add_must_override
in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit a1e6da2f080c25a6bb4cd11e734af4971064c982
Author: Tian Jiang <jt...@163.com>
AuthorDate: Thu Jan 29 17:41:47 2026 +0800
add must override
---
.../java/org/apache/tsfile/utils/MustOverride.java | 36 ++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/java/tsfile/src/main/java/org/apache/tsfile/utils/MustOverride.java b/java/tsfile/src/main/java/org/apache/tsfile/utils/MustOverride.java
new file mode 100644
index 00000000..1918afb4
--- /dev/null
+++ b/java/tsfile/src/main/java/org/apache/tsfile/utils/MustOverride.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tsfile.utils;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Methods annotated by this must be overridden by all subclasses.
+ *
+ * For example, if class Parent has a method m1 marked with @MustOverride, and Child is Parent's
+ * subclass, then Child must implement m1, too.
+ */
+@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
+@Retention(RetentionPolicy.CLASS)
+public @interface MustOverride {
+
+}