public class PropertyUtils
extends java.lang.Object
Constructor and Description |
---|
PropertyUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
coerce(Property<T> target,
java.lang.Object value)
Attempts to coerce the provided value into the type expected by the provided property.
|
static java.lang.Object |
coerceUnchecked(Property<?> target,
java.lang.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.
|
static boolean |
isDefault(Property<?> property,
java.lang.Object value)
Returns true if the value is *essentially* equal to the default value of the property.
|
static boolean |
isReference(java.lang.Object value) |
static <T extends Property<?>> |
values(java.lang.Class<?> classToSearch,
java.lang.Class<? extends T> propType)
Searches the provided class for static Property values and returns them as an array.
|
public static <T> T coerce(Property<T> target, java.lang.Object value) throws PropertyTypeException
PropertyTypeException
public static java.lang.Object coerceUnchecked(Property<?> target, java.lang.Object value) throws PropertyTypeException
PropertyTypeException
public static boolean isDefault(Property<?> property, java.lang.Object value)
public static <T extends Property<?>> T[] values(java.lang.Class<?> classToSearch, java.lang.Class<? extends T> propType)
classToSearch
- the class that has static property definitionspropType
- the class type of the properties.public static boolean isReference(java.lang.Object value)