|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.planetalia.dynject.injection.DataHandlerSupport
public abstract class DataHandlerSupport
Provides a convenience ancestor for IDataHandler implementations
| Constructor Summary | |
|---|---|
DataHandlerSupport()
|
|
| Method Summary | |
|---|---|
protected void |
addError(Configuration cfg,
java.lang.String name,
ErrorMap errors,
java.lang.Object instance,
java.lang.Object data,
java.lang.Class<? extends java.lang.annotation.Annotation> triggeringAnnotation,
java.lang.Object... params)
Adds an error to the map of errors, automatically retrieving the message and message key from the configuration. |
protected boolean |
find(java.lang.String[] array,
java.lang.Object data)
Locates a piece of data within a string array. |
protected boolean |
findIgnoreCase(java.lang.String[] array,
java.lang.Object data)
Locates a piece of data within a string array, ignoring capitalization. |
static java.util.List<java.lang.String> |
getEnumValues(java.lang.Class clazz)
Returns a list containing the names of all the members of an enumeration |
protected java.lang.Object |
nullAs(java.lang.Class clazz)
Represents the null value as some non-null, presumably "neutral" value of the specified class> If the class is CharSequence (i.e. |
protected java.lang.Object |
valueAs(java.lang.String value,
java.lang.Class clazz)
Tries to represent a string as a value of a specific class or a class compatible with it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.planetalia.dynject.injection.IDataHandler |
|---|
process |
| Constructor Detail |
|---|
public DataHandlerSupport()
| Method Detail |
|---|
protected void addError(Configuration cfg,
java.lang.String name,
ErrorMap errors,
java.lang.Object instance,
java.lang.Object data,
java.lang.Class<? extends java.lang.annotation.Annotation> triggeringAnnotation,
java.lang.Object... params)
cfg - Current configurationname - Property name to which the error is linkederrors - Error map to which the error is addedinstance - Instance holding the propertydata - Data that caused the errortriggeringAnnotation - Annotation type that triggered the errorparams - Message parameters to add.protected java.lang.Object nullAs(java.lang.Class clazz)
CharSequence (i.e. Strings, StringBuffers, StringBuilders,etc) nulls are converted to ""
clazz - Target class
protected java.lang.Object valueAs(java.lang.String value,
java.lang.Class clazz)
value - Value to convert. Cannot be null. If you need to convert the null value to a target
nonnull value, use nullAs(Class) insteadclazz - Target class
protected boolean find(java.lang.String[] array,
java.lang.Object data)
array - Array where to perform the searchdata - Value to search
protected boolean findIgnoreCase(java.lang.String[] array,
java.lang.Object data)
array - Array where to perform the searchdata - Value to search
public static java.util.List<java.lang.String> getEnumValues(java.lang.Class clazz)
clazz - Enumeration class to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||