}
// create the type declaration
ClassOrInterfaceDeclaration type = new ClassOrInterfaceDeclaration(ModifierSet.PUBLIC, true, informerInfos.getInformerName());
type.setExtends(Arrays.asList(new ClassOrInterfaceType(Informer.class.getSimpleName() + "<" + informerInfos.className + ">")));
type.setJavaDoc(new JavadocComment("\n" + "Informer for {@link " + informerInfos.className + "}\n" + "@author InformerMojos\n"));
List<AnnotationExpr> annotations = new LinkedList<AnnotationExpr>();
// Constructing generated annotation value
List<MemberValuePair> parameters = new LinkedList<MemberValuePair>();
parameters.add(new MemberValuePair("date", new StringLiteralExpr(
javax.xml.bind.DatatypeConverter.printDateTime(GregorianCalendar.getInstance()))));
parameters.add(new MemberValuePair("comments", new StringLiteralExpr("generated by gaedo-informer-generator")));
List<Expression> values = new LinkedList<Expression>();
values.add(new StringLiteralExpr(informerInfos.getQualifiedClassName()));
parameters.add(new MemberValuePair("value",
new ArrayInitializerExpr(values)));
NormalAnnotationExpr generated = new NormalAnnotationExpr(ASTHelper.createNameExpr(Generated.class.getName()), parameters);
type.setAnnotations(annotations);
ASTHelper.addTypeDeclaration(cu, type);
for (PropertyInfos infos : informerInfos.properties) {
// create a method
MethodDeclaration method = new MethodDeclaration(ModifierSet.PUBLIC, ASTHelper.VOID_TYPE, "get" + Utils.uppercaseFirst(infos.name));
String informerTypeFor = InformerTypeFinder.getInformerTypeFor(resolvedInformers, qualifiedEnums, imports, infos);
method.setType(new ClassOrInterfaceType(informerTypeFor));
method.setJavaDoc(new JavadocComment(infos.generateJavadoc(informerInfos, informerTypeFor)));
ASTHelper.addMember(type, method);
}
imports.remove(informerInfos.classPackage);
imports.remove("java.lang");