1/* 2 * Copyright (c) 2024-2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * 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 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @category core/base 18 */ 19export class Decorator { 20 kind: string; 21 content: string = ''; 22 param: string = ''; 23 constructor(name: string) { 24 this.kind = name; 25 } 26 public getKind(): string { 27 return this.kind; 28 } 29 public setContent(content: string): void { 30 this.content = content; 31 } 32 public getContent(): string { 33 return this.content; 34 } 35 public setParam(param: string): void { 36 this.param = param; 37 } 38 public getParam(): string { 39 return this.param; 40 } 41 public toString(): string { 42 return `@${this.content}`; 43 } 44} 45