blob: 3bfa78ac857f418e6ac009faccacefb78544a205 [file] [log] [blame]
Ashley Rose0b671da2019-01-25 15:41:29 -05001package com.android.node;
Ashley Rose171a7232018-12-11 17:32:58 -05002
3import android.view.inspector.InspectionCompanion;
4import android.view.inspector.PropertyMapper;
5import android.view.inspector.PropertyReader;
6import java.lang.Override;
7
8/**
Ashley Rose0b671da2019-01-25 15:41:29 -05009 * Inspection companion for {@link TestNode}.
Ashley Rose171a7232018-12-11 17:32:58 -050010 *
11 * Generated by {@link android.processor.view.inspector.InspectionCompanionGenerator}
12 * on behalf of {@link android.processor.view.inspector.InspectionCompanionGeneratorTest}.
13 */
Ashley Rosefdb5af22019-03-08 17:23:38 -050014public final class TestNode$InspectionCompanion implements InspectionCompanion<TestNode> {
Ashley Rose171a7232018-12-11 17:32:58 -050015 /**
16 * Set by {@link #mapProperties(PropertyMapper)} once properties have been mapped.
17 */
18 private boolean mPropertiesMapped = false;
19
20 /**
21 * Property ID of {@code suppliedAttributeProperty}.
22 */
23 private int mSuppliedAttributePropertyId;
24
25 @Override
26 public void mapProperties(PropertyMapper propertyMapper) {
27 mSuppliedAttributePropertyId = propertyMapper.mapInt("suppliedAttributeProperty",
28 0xdecafbad);
29 mPropertiesMapped = true;
30 }
31
32 @Override
Ashley Rose0b671da2019-01-25 15:41:29 -050033 public void readProperties(TestNode node, PropertyReader propertyReader) {
Ashley Rose171a7232018-12-11 17:32:58 -050034 if (!mPropertiesMapped) {
35 throw new InspectionCompanion.UninitializedPropertyMapException();
36 }
Ashley Rose0b671da2019-01-25 15:41:29 -050037 propertyReader.readInt(mSuppliedAttributePropertyId, node.getSuppliedAttributeProperty());
Ashley Rose171a7232018-12-11 17:32:58 -050038 }
39}