|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.keepondreaming.xml.annotations.JavaAnnotationsStrategy
public class JavaAnnotationsStrategy
Resolves annotations needed by the XmlConverter
by using the Annotation mechanism, introduced
with Java 1.5, eg. Java 5 or also called Tiger
$Author: wintermond $
$Date: 2005/07/10 18:34:58 $
$Log: JavaAnnotationsStrategy.java,v $
Revision 1.1 2005/07/10 18:34:58 wintermond
Renamed from AnnotationsParserStrategy
javadoc
| Constructor Summary | |
|---|---|
JavaAnnotationsStrategy()
Default constructor |
|
| Method Summary | |
|---|---|
java.lang.String |
getContentAttribute(java.lang.Class unused,
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaAnnotationsStrategy()
| Method Detail |
|---|
public java.lang.String getContentAttribute(java.lang.Class unused,
java.lang.Object object)
AnnotationStrategyXmlConverter 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
getContentAttribute in interface AnnotationStrategyunused - Name of the current class, never nullobject - The current objct processed
public java.lang.String getKeyAttribute(java.lang.reflect.Method method)
AnnotationStrategyXmlConverter 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">
getKeyAttribute in interface AnnotationStrategymethod - Method returning a Map
public java.lang.Class getGenericReturnType(java.lang.reflect.Method method)
AnnotationStrategyXmlConverter 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.
getGenericReturnType in interface AnnotationStrategymethod - Getter method returning aCollection or Map
public java.lang.String getDateFormatPattern(java.lang.reflect.Method method)
AnnotationStrategyXmlConverter 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
getDateFormatPattern in interface AnnotationStrategymethod - Getter method returning a Date or one of its subclasses
public void init()
AnnotationStrategy
init in interface AnnotationStrategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||