public static PropertyValue createAlertTypeValue (AlertType alertType) { return PropertyValue.createEnumValue (MidpEnumDescriptor.alertTypePD, TYPEID_ALERT_TYPE, alertType); }
/** * Creates a property value representing a primitive or an enum value. * @param projectType the project type * @param type the non-array type id that is primitive * @param value the object that represents the value in the design time * @return the property value */ public static PropertyValue createValue(String projectType, TypeID type, Object value) { if (type.getKind() == TypeID.Kind.ENUM) { return createEnumValue(EnumDescriptorFactoryRegistry.getDescriptor(projectType, type), type, value); } else { return createValue(PrimitiveDescriptorFactoryRegistry.getDescriptor(projectType, type), type, value); } }
throw new IllegalArgumentException(); return createEnumValue(descriptor, type, descriptor.deserialize(serialized.substring(1)));