if (returnType != dateTimeFormat) {
logger.log(TreeLogger.ERROR, typeName + "." + method.getName()
+ " must return DateTimeFormat");
throw new UnableToCompleteException();
}
Pattern annotation = method.getAnnotation(Pattern.class);
if (annotation == null) {
logger.log(TreeLogger.ERROR, typeName + "." + method.getName()
+ " must have an @Pattern annotation");
throw new UnableToCompleteException();
}
String pattern = annotation.value();
pattern = dtpg.getBestPattern(pattern);
writer.println();
writer.println("public "
+ method.getReturnType().getQualifiedSourceName() + " "
+ method.getName() + "() {");