Class PropertyUtils
java.lang.Object
com.inductiveautomation.ignition.common.config.PropertyUtils
Some basic functions that aide our use of properties, or help consolidate logic.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleananyModified(VersionedPropertySet diff, Property<?>... props) Returns true if any of the provided properties are marked as modified in the diff.static booleananyModified(VersionedPropertySet diff, Collection<Property<?>> props) Returns true if any of the provided properties are marked as modified in the diff.static BoundValuebindParameterReference(Object value) static <T> TAttempts to coerce the provided value into the type expected by the provided property.static ObjectcoerceUnchecked(Property<?> target, Object value) This version of coerce does not return a generic type, and also will return a string if the incoming value appears to be a reference.getModifiedProperties(PropertySet original, PropertySet newSet) static QualifiedValuegetPotentiallyBoundDisplayValue(PropertySet props, Property<?> prop) static StringgetReferenceAsString(Object value) static booleanReturns true if the value is *essentially* equal to the default value of the property.static booleanisReference(Object value) static voidsetPotentialParameterBoundValue(PropertySet props, Property<?> prop, Object value) Works with potentially non-bindable propertyset, and strings that may not have references.static <T extends Property<?>>
 T[]Searches the provided class for static Property values and returns them as an array.
- 
Constructor Details- 
PropertyUtilspublic PropertyUtils()
 
- 
- 
Method Details- 
coerceAttempts to coerce the provided value into the type expected by the provided property.- Throws:
- PropertyTypeException
 
- 
coerceUncheckedThis version of coerce does not return a generic type, and also will return a string if the incoming value appears to be a reference.- Throws:
- PropertyTypeException
 
- 
isDefaultReturns true if the value is *essentially* equal to the default value of the property. "Essentially" means normal equality, but also, Empty List or PropertySet to null and vice versa.
- 
valuespublic static <T extends Property<?>> T[] values(Class<?> classToSearch, Class<? extends T> propType) Searches the provided class for static Property values and returns them as an array. Does not return null.- Parameters:
- classToSearch- the class that has static property definitions
- propType- the class type of the properties.
 
- 
getReferenceAsString
- 
isReference
- 
bindParameterReference
- 
setPotentialParameterBoundValuepublic static void setPotentialParameterBoundValue(PropertySet props, Property<?> prop, Object value) Works with potentially non-bindable propertyset, and strings that may not have references. If not a reference, will try to coerce into correct value.
- 
getPotentiallyBoundDisplayValue
- 
anyModifiedReturns true if any of the provided properties are marked as modified in the diff.
- 
anyModifiedReturns true if any of the provided properties are marked as modified in the diff.
- 
getModifiedProperties
 
-