blob: 738bcd3dab366f1e3579acfabbbf6636a49a5e41 [file] [log] [blame]
Ashley Rose0b671da2019-01-25 15:41:29 -05001package com.android.node;
Ashley Rose171a7232018-12-11 17:32:58 -05002
Ashley Rose171a7232018-12-11 17:32:58 -05003import 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 noAttributeProperty}.
22 */
23 private int mNoAttributePropertyId;
24
25 @Override
26 public void mapProperties(PropertyMapper propertyMapper) {
Ashley Rosec1a4dec2018-12-13 18:06:30 -050027 mNoAttributePropertyId = propertyMapper.mapInt("noAttributeProperty", 0);
Ashley Rose171a7232018-12-11 17:32:58 -050028 mPropertiesMapped = true;
29 }
30
31 @Override
Ashley Rose0b671da2019-01-25 15:41:29 -050032 public void readProperties(TestNode node, PropertyReader propertyReader) {
Ashley Rose171a7232018-12-11 17:32:58 -050033 if (!mPropertiesMapped) {
34 throw new InspectionCompanion.UninitializedPropertyMapException();
35 }
Ashley Rose0b671da2019-01-25 15:41:29 -050036 propertyReader.readInt(mNoAttributePropertyId, node.getNoAttributeProperty());
Ashley Rose171a7232018-12-11 17:32:58 -050037 }
38}