This repository was archived by the owner on Nov 21, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed
src/main/java/org/thinkit/formatter/json Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021 Kato Shinya.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+ * in compliance with the License. You may obtain a copy of the License at
6+ *
7+ * http://www.apache.org/licenses/LICENSE-2.0
8+ *
9+ * Unless required by applicable law or agreed to in writing, software distributed under the License
10+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+ * or implied. See the License for the specific language governing permissions and limitations under
12+ * the License.
13+ */
14+
15+ package org .thinkit .formatter .json ;
16+
17+ import lombok .NonNull ;
18+
19+ /**
20+ * 整形処理を行うフォーマッターを抽象化したインターフェースです。 {@link Formatter} インターフェースを実装する具象クラスは
21+ * {@link Formatter#format(String)} メソッドを必ず実装してください。
22+ *
23+ * @author Kato Shinya
24+ * @since 1.0.0
25+ */
26+ public interface Formatter {
27+
28+ /**
29+ * 引数として渡された {@code unformatted} に格納された文字列を整形し返却します。
30+ *
31+ * @param rawJson 整形されていないJSON文字列
32+ * @return 整形された文字列
33+ *
34+ * @exception NullPointerException 引数として {@code null} が渡された場合
35+ */
36+ public String format (@ NonNull final String rawJson );
37+ }
Original file line number Diff line number Diff line change 1414
1515package org .thinkit .formatter .json ;
1616
17- import org .thinkit .formatter .common .Formatter ;
1817import org .thinkit .formatter .common .Tokenizable ;
1918import org .thinkit .formatter .json .catalog .Brace ;
2019import org .thinkit .formatter .json .catalog .Bracket ;
You can’t perform that action at this time.
0 commit comments