1/* 2 * Copyright (c) 2022-2024 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@Entry 16@Component 17struct ValidateAccessQualifierHomeComponent { 18 @State message: string = "hello" 19 20 build() { 21 Column() { 22 TestAccessQualifier({ 23 regular_value: "hello", 24 state_value: "hello", 25 link_value: this.message, 26 prop_value: "hello", 27 value: "hello" 28 }) 29 } 30 .height(500) 31 } 32} 33 34@Component 35struct TestAccessQualifier { 36 private regular_value: string = "hello" 37 @State private state_value: string = "hello" 38 @StorageLink("a") public storage_value: string = "hello" 39 @Consume public consume_value: string 40 @Link private link_value: string 41 @Provide protected provide_value: string = "hello" 42 @Require @Prop private prop_value: string = "hello" 43 @Require private value: string = "hello" 44 45 build() {} 46}