blob: 764aa8bfbd635ee38ddecdaf5cddd06327d8a30c [file] [log] [blame]
package com.android.node;
import android.R;
import android.view.inspector.InspectionCompanion;
import android.view.inspector.IntEnumMapping;
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 intEnumProperty}.
*/
private int mIntEnumPropertyId;
@Override
public void mapProperties(PropertyMapper propertyMapper) {
mIntEnumPropertyId = propertyMapper.mapIntEnum("intEnumProperty", R.attr.intEnumProperty,
new IntEnumMapping.Builder()
.addValue("ONE", 1)
.addValue("TWO", 2)
.addValue("THREE", 3)
.build());
mPropertiesMapped = true;
}
@Override
public void readProperties(TestNode node, PropertyReader propertyReader) {
if (!mPropertiesMapped) {
throw new InspectionCompanion.UninitializedPropertyMapException();
}
propertyReader.readIntEnum(mIntEnumPropertyId, node.getIntEnumProperty());
}
}