public final class ConfigurationTypeManager
extends java.lang.Object
ConfigurationTypeManager
is responsible for managing configuration types.I2cDeviceType
,
AnalogSensorType
,
DigitalIoDeviceType
,
ServoType
,
MotorType
,
I2cDeviceType
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static java.lang.String |
TAG |
Constructor and Description |
---|
ConfigurationTypeManager() |
Modifier and Type | Method and Description |
---|---|
ConfigurationType |
configurationTypeFromTag(java.lang.String xmlTag) |
void |
deserializeUserDeviceTypes(java.lang.String serialization) |
void |
filterAllClassesComplete() |
void |
filterAllClassesStart() |
void |
filterClass(java.lang.Class clazz) |
void |
filterOnBotJavaClass(java.lang.Class clazz) |
void |
filterOnBotJavaClassesComplete() |
void |
filterOnBotJavaClassesStart() |
java.util.List<ConfigurationType> |
getApplicableConfigTypes(ConfigurationType.DeviceFlavor deviceFlavor,
ControlSystem controlSystem)
Get the applicable configuration types to populate dropdowns with (don't use this variant for REV I2C)
|
java.util.List<ConfigurationType> |
getApplicableConfigTypes(ConfigurationType.DeviceFlavor deviceFlavor,
ControlSystem controlSystem,
int i2cBus)
Get the applicable configuration types to populate dropdowns with
|
Gson |
getGson() |
static ConfigurationTypeManager |
getInstance() |
ServoConfigurationType |
getStandardServoType() |
MotorConfigurationType |
getUnspecifiedMotorType() |
static java.lang.String |
getXmlTag(java.lang.Class clazz) |
protected <A extends java.lang.annotation.Annotation> |
processAnnotationIfPresent(MotorConfigurationType motorConfigurationType,
java.lang.Class<?> clazz,
java.lang.Class<A> annotationType) |
protected <NewType extends java.lang.annotation.Annotation,OldType extends java.lang.annotation.Annotation> |
processNewOldAnnotations(MotorConfigurationType motorConfigurationType,
java.lang.Class<?> clazz,
java.lang.Class<NewType> newType,
java.lang.Class<OldType> oldType) |
void |
sendUserDeviceTypes() |
UserConfigurationType |
userTypeFromClass(ConfigurationType.DeviceFlavor flavor,
java.lang.Class<?> clazz) |
public static final java.lang.String TAG
public static boolean DEBUG
public static ConfigurationTypeManager getInstance()
public MotorConfigurationType getUnspecifiedMotorType()
public ServoConfigurationType getStandardServoType()
public ConfigurationType configurationTypeFromTag(java.lang.String xmlTag)
public UserConfigurationType userTypeFromClass(ConfigurationType.DeviceFlavor flavor, java.lang.Class<?> clazz)
public java.util.List<ConfigurationType> getApplicableConfigTypes(ConfigurationType.DeviceFlavor deviceFlavor, ControlSystem controlSystem, int i2cBus)
deviceFlavor
- What type of device is being configuredcontrolSystem
- What type of control system the device is connected to. If null, we err on the side of including types.i2cBus
- Which I2C bus on the REV hub the device is connected to. Ignored if you pass anything other than DeviceFlavor.I2C and ControlSystem.REV_HUB.public java.util.List<ConfigurationType> getApplicableConfigTypes(ConfigurationType.DeviceFlavor deviceFlavor, ControlSystem controlSystem)
deviceFlavor
- What type of device is being configuredcontrolSystem
- What type of control system the device is connected to. If null, we err on the side of including types.public Gson getGson()
public void sendUserDeviceTypes()
public void deserializeUserDeviceTypes(java.lang.String serialization)
public void filterAllClassesStart()
public void filterOnBotJavaClassesStart()
public void filterClass(java.lang.Class clazz)
public void filterOnBotJavaClass(java.lang.Class clazz)
public void filterAllClassesComplete()
public void filterOnBotJavaClassesComplete()
protected <NewType extends java.lang.annotation.Annotation,OldType extends java.lang.annotation.Annotation> void processNewOldAnnotations(MotorConfigurationType motorConfigurationType, java.lang.Class<?> clazz, java.lang.Class<NewType> newType, java.lang.Class<OldType> oldType)
protected <A extends java.lang.annotation.Annotation> boolean processAnnotationIfPresent(MotorConfigurationType motorConfigurationType, java.lang.Class<?> clazz, java.lang.Class<A> annotationType)
public static java.lang.String getXmlTag(java.lang.Class clazz)