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 <[email protected]> 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 { + +}
