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