Ashley Rose | 0b671da | 2019-01-25 15:41:29 -0500 | [diff] [blame] | 1 | package com.android.node; |
Ashley Rose | 171a723 | 2018-12-11 17:32:58 -0500 | [diff] [blame] | 2 | |
| 3 | import android.view.inspector.InspectionCompanion; |
| 4 | import android.view.inspector.PropertyMapper; |
| 5 | import android.view.inspector.PropertyReader; |
| 6 | import java.lang.Override; |
| 7 | |
| 8 | /** |
Ashley Rose | 0b671da | 2019-01-25 15:41:29 -0500 | [diff] [blame] | 9 | * Inspection companion for {@link TestNode}. |
Ashley Rose | 171a723 | 2018-12-11 17:32:58 -0500 | [diff] [blame] | 10 | * |
| 11 | * Generated by {@link android.processor.view.inspector.InspectionCompanionGenerator} |
| 12 | * on behalf of {@link android.processor.view.inspector.InspectionCompanionGeneratorTest}. |
| 13 | */ |
Ashley Rose | 0b671da | 2019-01-25 15:41:29 -0500 | [diff] [blame] | 14 | public final class TestNode$$InspectionCompanion implements InspectionCompanion<TestNode> { |
Ashley Rose | 171a723 | 2018-12-11 17:32:58 -0500 | [diff] [blame] | 15 | /** |
| 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 Rose | 0b671da | 2019-01-25 15:41:29 -0500 | [diff] [blame] | 33 | public void readProperties(TestNode node, PropertyReader propertyReader) { |
Ashley Rose | 171a723 | 2018-12-11 17:32:58 -0500 | [diff] [blame] | 34 | if (!mPropertiesMapped) { |
| 35 | throw new InspectionCompanion.UninitializedPropertyMapException(); |
| 36 | } |
Ashley Rose | 0b671da | 2019-01-25 15:41:29 -0500 | [diff] [blame] | 37 | propertyReader.readInt(mSuppliedAttributePropertyId, node.getSuppliedAttributeProperty()); |
Ashley Rose | 171a723 | 2018-12-11 17:32:58 -0500 | [diff] [blame] | 38 | } |
| 39 | } |