blob: 75f2813149659f34ffec519f36a69f258fe5696d [file] [log] [blame]
Ashley Rose0b671da2019-01-25 15:41:29 -05001package com.android.node;
2
3import android.view.inspector.InspectionCompanion;
4import android.view.inspector.IntFlagMapping;
5import android.view.inspector.PropertyMapper;
6import android.view.inspector.PropertyReader;
7import java.lang.Override;
8
9/**
10 * Inspection companion for {@link TestNode}.
11 *
12 * Generated by {@link android.processor.view.inspector.InspectionCompanionGenerator}
13 * on behalf of {@link android.processor.view.inspector.InspectionCompanionGeneratorTest}.
14 */
15public final class TestNode$$InspectionCompanion implements InspectionCompanion<TestNode> {
16 /**
17 * Set by {@link #mapProperties(PropertyMapper)} once properties have been mapped.
18 */
19 private boolean mPropertiesMapped = false;
20
21 /**
22 * Property ID of {@code intFlag}.
23 */
24 private int mIntFlagId;
25
26 @Override
27 public void mapProperties(PropertyMapper propertyMapper) {
28 mIntFlagId = propertyMapper.mapIntFlag("intFlag", 0, new IntFlagMapping.Builder()
29 .addFlag("OVERDRIVE", 0x00000002, 0x00000003)
30 .addFlag("TURBO", 0x00000001, 0x00000003)
31 .addFlag("WARP", 0x00000004)
32 .build());
33 mPropertiesMapped = true;
34 }
35
36 @Override
37 public void readProperties(TestNode node, PropertyReader propertyReader) {
38 if (!mPropertiesMapped) {
39 throw new InspectionCompanion.UninitializedPropertyMapException();
40 }
41 propertyReader.readIntFlag(mIntFlagId, node.getIntFlag());
42 }
43}