232425262728293031
*/ public class AnnotationDataTypeAnalyzer implements DataTypeAnalyzer { public String identifyDataType(PropertyAdapter adapter) { DataType annotation = adapter.getAnnotation(DataType.class); return annotation == null ? null : annotation.value(); }
2223242526272829303132
public class AnnotationDataTypeAnalyzerTest extends TapestryTestCase { private DataType mockDataType(String annotationValue) { DataType annotation = newMock(DataType.class); expect(annotation.value()).andReturn(annotationValue).atLeastOnce(); return annotation; }