blob: 75f2813149659f34ffec519f36a69f258fe5696d [file] [log] [blame]
package com.android.node;
import android.view.inspector.InspectionCompanion;
import android.view.inspector.IntFlagMapping;
import android.view.inspector.PropertyMapper;
import android.view.inspector.PropertyReader;
import java.lang.Override;
/**
* Inspection companion for {@link TestNode}.
*
* Generated by {@link android.processor.view.inspector.InspectionCompanionGenerator}
* on behalf of {@link android.processor.view.inspector.InspectionCompanionGeneratorTest}.
*/
public final class TestNode$$InspectionCompanion implements InspectionCompanion<TestNode> {
/**
* Set by {@link #mapProperties(PropertyMapper)} once properties have been mapped.
*/
private boolean mPropertiesMapped = false;
/**
* Property ID of {@code intFlag}.
*/
private int mIntFlagId;
@Override
public void mapProperties(PropertyMapper propertyMapper) {
mIntFlagId = propertyMapper.mapIntFlag("intFlag", 0, new IntFlagMapping.Builder()
.addFlag("OVERDRIVE", 0x00000002, 0x00000003)
.addFlag("TURBO", 0x00000001, 0x00000003)
.addFlag("WARP", 0x00000004)
.build());
mPropertiesMapped = true;
}
@Override
public void readProperties(TestNode node, PropertyReader propertyReader) {
if (!mPropertiesMapped) {
throw new InspectionCompanion.UninitializedPropertyMapException();
}
propertyReader.readIntFlag(mIntFlagId, node.getIntFlag());
}
}