|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.planetalia.dynject.injection.DataStep
public class DataStep
Represents a single processing step in the datapath. Each data step corresponds to one specific annotation, although that annotation might not have been specified in the annotated element (for example, class annotations are applied to all members)
| Field Summary | |
|---|---|
protected java.lang.annotation.Annotation |
annotation
Reference to the original annotation |
protected Configuration |
config
Configuration of the annotation |
protected IDataHandler |
handler
Data handler to use. |
protected ClassPreferences |
inputClasses
List of compatible input classes for this data step |
| Constructor Summary | |
|---|---|
DataStep()
Creates an empty data step |
|
DataStep(java.lang.annotation.Annotation annotation)
Parses an annotation and creates a DataStep for it. |
|
DataStep(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
Configuration cfg)
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
coerceToType(Configuration config,
Environment runtimeEnvironment,
ErrorMap errors,
java.lang.String name,
java.lang.Object instance,
java.lang.Object sourceValue,
ClassPreferences requiredClasses)
Forces a data value to be of the specified type, generating an error if it is not no compatbile conversion can be found |
java.lang.Object |
execute(Environment runtimeEnvironment,
ErrorMap errors,
java.lang.String name,
java.lang.Object instance,
java.lang.Object sourceValue,
ClassPreferences preferredOutputClasses)
Executes (applies) the data step |
java.lang.annotation.Annotation |
getAnnotation()
Returns the annotation to which this data step belongs |
Configuration |
getConfig()
Returns the annotation configuration |
IDataHandler |
getHandler()
Retrieves the data handler associated with this step |
ClassPreferences |
getInputClasses()
Returns the input class preferences |
void |
setAnnotation(java.lang.annotation.Annotation annotation)
Sets the annotation to which this data step belongs |
void |
setConfig(Configuration config)
Sets the annotation configuration |
void |
setHandler(IDataHandler handler)
Sets the data handler associated with this step |
void |
setInputClasses(ClassPreferences inputClasses)
Sets the input class preferences |
void |
setInputClassesFrom(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Sets the list of input classes of this data step to match those of a specific annotation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.annotation.Annotation annotation
protected ClassPreferences inputClasses
protected Configuration config
protected IDataHandler handler
| Constructor Detail |
|---|
public DataStep()
public DataStep(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
Configuration cfg)
public DataStep(java.lang.annotation.Annotation annotation)
annotation - Annotation to read| Method Detail |
|---|
public static java.lang.Object coerceToType(Configuration config,
Environment runtimeEnvironment,
ErrorMap errors,
java.lang.String name,
java.lang.Object instance,
java.lang.Object sourceValue,
ClassPreferences requiredClasses)
config - Configurationerrors - Map of errors where to store any processing/validation errorsname - Name of the property being processedinstance - Instance holding the propertyruntimeEnvironment - Runtime environment of the annotationsourceValue - Value to feed to the data steprequiredClasses - Specifies the list of preferred classes that the value must be covnerted to
public java.lang.Object execute(Environment runtimeEnvironment,
ErrorMap errors,
java.lang.String name,
java.lang.Object instance,
java.lang.Object sourceValue,
ClassPreferences preferredOutputClasses)
errors - Map of errors where to store any processing/validation errorsname - Name of the property being processedinstance - Instance holding the propertyruntimeEnvironment - Runtime environment of the annotationsourceValue - Value to feed to the data steppreferredOutputClasses - Specifies the list of preferred classes that the next step would like to use.
This preference MAY or MAY NOT be followed.
public java.lang.annotation.Annotation getAnnotation()
public void setAnnotation(java.lang.annotation.Annotation annotation)
annotation - annotation to which this data step belongspublic Configuration getConfig()
public void setConfig(Configuration config)
config - Annotation Configurationpublic ClassPreferences getInputClasses()
public void setInputClasses(ClassPreferences inputClasses)
inputClasses - input class preferencespublic IDataHandler getHandler()
public void setHandler(IDataHandler handler)
handler - Data handler associated with this steppublic void setInputClassesFrom(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
annotationType - Annotation type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||