|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AnnotationStrategy
Instances of this class provide a XmlConverter
with lookup methods to receive metadata information not obtainable
by runtime class information
$Author: wintermond $
$Date: 2005/07/10 18:38:07 $
$Log: AnnotationStrategy.java,v $
Revision 1.1 2005/07/10 18:38:07 wintermond
Renamed ParserStrategy to AnnotationStrategy
Added support to annotate date format patterns
Revision 1.3 2005/07/09 09:58:29 wintermond
javadoc
Method Summary | |
---|---|
java.lang.String |
getContentAttribute(java.lang.Class clazz,
java.lang.Object object)
This method is called whenever the XmlConverter wants to set contents read
by the ContentHandler.characters(char[], int, int) -method. |
java.lang.String |
getDateFormatPattern(java.lang.reflect.Method method)
This method is called whenever the XmlConverter reads a String
for a method returning a Date or one of its subclasses. |
java.lang.Class |
getGenericReturnType(java.lang.reflect.Method method)
This method is called whenever the XmlConverter wants to set the contents
of a Collection - or Map -return type. |
java.lang.String |
getKeyAttribute(java.lang.reflect.Method method)
Called by the XmlConverter if an entry has to be set in a Map . |
void |
init()
Restore initial state |
Method Detail |
---|
java.lang.String getContentAttribute(java.lang.Class clazz, java.lang.Object object)
XmlConverter
wants to set contents read
by the ContentHandler.characters(char[], int, int)
-method.
The XmlConverter
needs the attribute name designated for the content to lookup
the corresponding setter method.
clazz
is guaranteed to be not null
clazz
- Name of the current class, never nullobject
- The current objct processed
java.lang.String getKeyAttribute(java.lang.reflect.Method method)
XmlConverter
if an entry has to be set in a Map
.
The name of the attribute containing the key identifier gets returned.
Note: At the moment the key attribute must be of type String
and the attribute must
be read as an attribute, not as a sub tag!
This means that
<myTag><myKeyAttribute>myKeyValue</myKeyAttribute></myTag> will not work, use instead
<myTag myKeyAttribute="myKeyValue">
method
- Method returning a Map
java.lang.Class getGenericReturnType(java.lang.reflect.Method method)
XmlConverter
wants to set the contents
of a Collection
- or Map
-return type.
The method returns the base class all stored elements must be assignable to.
Note that the ProxyObjectStrategy
requires the returned class types to be interfaces.
method
- Getter method returning aCollection
or Map
java.lang.String getDateFormatPattern(java.lang.reflect.Method method)
XmlConverter
reads a String
for a method returning a Date
or one of its subclasses.
Values can be either longs or formatted strings, which have to be converted to
longs.
This method returns the formatting string, or null if values are expected as longs
method
- Getter method returning a Date
or one of its subclasses
void init()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |