public class PropertyUtility extends Object
Constructor and Description |
---|
PropertyUtility() |
Modifier and Type | Method and Description |
---|---|
static PropertyGroupDesc[] |
analyzeGroups(String[] allProperties,
EventType[] deltaEventTypes,
String[] names)
Analyze multiple event types and determine common property sets that form property groups.
|
protected static String[] |
copyAndSort(String[] input)
Copy an sort the input array.
|
static EventPropertyGetter[] |
getGetters(EventType eventType,
String[] propertyNames)
Return getters for property names.
|
static Map<String,int[]> |
getGroupsPerProperty(PropertyGroupDesc[] groups)
From a list of property groups that include multiple group numbers for each property,
make a map of group numbers per property.
|
static PropertyAccessException |
getIllegalAccessException(Field field,
IllegalAccessException e) |
static PropertyAccessException |
getIllegalAccessException(Method method,
IllegalAccessException e) |
static PropertyAccessException |
getIllegalArgumentException(Field field,
IllegalArgumentException e) |
static PropertyAccessException |
getIllegalArgumentException(Method method,
IllegalArgumentException e) |
static PropertyAccessException |
getInvocationTargetException(Method method,
InvocationTargetException e) |
static Object |
getKeys(EventBean theEvent,
EventPropertyGetter[] keyPropertyGetters)
Returns a multi-key for an event and key property getters
|
static PropertyAccessException |
getMismatchException(Field field,
Object object,
ClassCastException e) |
static PropertyAccessException |
getMismatchException(Method method,
Object object,
ClassCastException e) |
static Map<EventType,RevisionTypeDesc> |
getPerType(PropertyGroupDesc[] groups,
String[] changesetProperties,
String[] keyProperties)
From a list of property groups that include contributing event types, build a map
of contributing event types and their type descriptor.
|
protected static String[] |
uniqueExclusiveSort(String[] values,
String[] removeValues)
Remove from values all removeValues and build a unique sorted result array.
|
public static Object getKeys(EventBean theEvent, EventPropertyGetter[] keyPropertyGetters)
theEvent
- to get keys forkeyPropertyGetters
- getters to usepublic static Map<EventType,RevisionTypeDesc> getPerType(PropertyGroupDesc[] groups, String[] changesetProperties, String[] keyProperties)
groups
- property groupschangesetProperties
- properties that change between groupskeyProperties
- key propertiespublic static Map<String,int[]> getGroupsPerProperty(PropertyGroupDesc[] groups)
groups
- property groupspublic static PropertyGroupDesc[] analyzeGroups(String[] allProperties, EventType[] deltaEventTypes, String[] names)
allProperties
- property names to look atdeltaEventTypes
- all types contributingnames
- names of properiesprotected static String[] copyAndSort(String[] input)
input
- to sortpublic static EventPropertyGetter[] getGetters(EventType eventType, String[] propertyNames)
eventType
- type to get getters frompropertyNames
- names to getprotected static String[] uniqueExclusiveSort(String[] values, String[] removeValues)
values
- to considerremoveValues
- values to remove from valuespublic static PropertyAccessException getMismatchException(Method method, Object object, ClassCastException e)
public static PropertyAccessException getMismatchException(Field field, Object object, ClassCastException e)
public static PropertyAccessException getInvocationTargetException(Method method, InvocationTargetException e)
public static PropertyAccessException getIllegalAccessException(Field field, IllegalAccessException e)
public static PropertyAccessException getIllegalArgumentException(Field field, IllegalArgumentException e)
public static PropertyAccessException getIllegalAccessException(Method method, IllegalAccessException e)
public static PropertyAccessException getIllegalArgumentException(Method method, IllegalArgumentException e)