Examples of JavadocComment


Examples of com.github.antlrjavaparser.api.body.JavadocComment

        if (rooComment instanceof org.springframework.roo.classpath.details.comments.LineComment) {
            comment = new LineComment();
        }
        else if (rooComment instanceof org.springframework.roo.classpath.details.comments.JavadocComment) {
            comment = new JavadocComment();
        }
        else {
            comment = new BlockComment();
        }
View Full Code Here

Examples of japa.parser.ast.body.JavadocComment

public class CompilationUnitBuilder {

    private CompilationUnit cu = new CompilationUnit();

    public CompilationUnitBuilder buildComment(String commentStr) {
        JavadocComment comment = new JavadocComment(commentStr);
        cu.setComment(comment);
        return this;
    }
View Full Code Here

Examples of japa.parser.ast.body.JavadocComment

    public ClassTypeBuilder(String clazzName) {
        type = new ClassOrInterfaceDeclaration(ModifierSet.PUBLIC, false, clazzName);
    }

    public ClassTypeBuilder buildComment(String commentStr) {
        JavadocComment comment = new JavadocComment(commentStr);
        type.setComment(comment);
        return this;
    }
View Full Code Here

Examples of japa.parser.ast.body.JavadocComment

    extended.add(new ClassOrInterfaceType(informerInfos.getAbstractInformerName()));
    if(informerInfos.superClassName!=null && !"Object".equals(informerInfos.superClassName)) {
      extended.add(new ClassOrInterfaceType(InformerInfos.buildAbstractInformerName(informerInfos.superClassName)));
    }
    type.setExtends(extended);
    type.setJavaDoc(new JavadocComment("\n" +
            "Informer for {@link " + informerInfos.className + "}\n" +
            "This is the public Informer class one must use to access dynamic properties methods." +
            "@author InformerMojos\n"));
    List<AnnotationExpr> annotations = new LinkedList<AnnotationExpr>();
    // Constructing generated annotation value
View Full Code Here

Examples of japa.parser.ast.body.JavadocComment

    if(informerInfos.superClassName!=null && !"Object".equals(informerInfos.superClassName)) {
      List<ClassOrInterfaceType> extended = new LinkedList<ClassOrInterfaceType>();
      extended.add(new ClassOrInterfaceType(InformerInfos.buildAbstractInformerName(informerInfos.superClassName)));
      type.setExtends(extended);
    }
    type.setJavaDoc(new JavadocComment("\n" +
            "Informer method container for {@link " + informerInfos.className + "}\n" +
            "This interface is to be used only by gaedo code. Its only role is to provide consistent method hierarchy.\n" +
            "As a consequence, refering to it directly has not the slightest interest and should never been done in user code." +
            "@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);
    annotations.add(generated);
    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");
View Full Code Here

Examples of japa.parser.ast.body.JavadocComment

    }

    // 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"));
    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.className, informerTypeFor)));
      ASTHelper.addMember(type, method);
    }
   
    imports.remove(informerInfos.classPackage);
    imports.remove("java.lang");
View Full Code Here

Examples of japa.parser.ast.body.JavadocComment

    ClassOrInterfaceDeclaration type = new ClassOrInterfaceDeclaration(ModifierSet.PUBLIC, true, informerInfos.getInformerName());
    List<ClassOrInterfaceType> extended = new LinkedList<ClassOrInterfaceType>();
    extended.add(new ClassOrInterfaceType(Informer.class.getSimpleName() + "<" + informerInfos.className + ">"));
    extended.add(new ClassOrInterfaceType(informerInfos.getAbstractInformerName()));
    type.setExtends(extended);
    type.setJavaDoc(new JavadocComment("\n" +
            "Informer for {@link " + informerInfos.className + "}\n" +
            "This is the public Informer class one must use to access dynamic properties methods." +
            "@author InformerMojos\n"));
    List<AnnotationExpr> annotations = new LinkedList<AnnotationExpr>();
    // Constructing generated annotation value
View Full Code Here

Examples of japa.parser.ast.body.JavadocComment

        imports.add(superClassPackage+"."+superInformer);
      }
      extended.add(new ClassOrInterfaceType(superInformer));
      type.setExtends(extended);
    }
    type.setJavaDoc(new JavadocComment("\n" +
            "Informer method container for {@link " + informerInfos.className + "}\n" +
            "This interface is to be used only by gaedo code. Its only role is to provide consistent method hierarchy.\n" +
            "As a consequence, refering to it directly has not the slightest interest and should never been done in user code." +
            "@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);
    annotations.add(generated);
    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");
View Full Code Here

Examples of japa.parser.ast.body.JavadocComment

public class CompilationUnitBuilder {

    private CompilationUnit cu = new CompilationUnit();

    public CompilationUnitBuilder buildComment(String commentStr) {
        Comment comment = new JavadocComment(commentStr);
        if (null != cu.getComments()) {
            cu.getComments().add(comment);
        } else {
            cu.setComment(comment);
        }
View Full Code Here

Examples of japa.parser.ast.body.JavadocComment

    public ClassTypeBuilder(String clazzName) {
        type = new ClassOrInterfaceDeclaration(ModifierSet.PUBLIC, false, clazzName);
    }

    public ClassTypeBuilder buildComment(String commentStr) {
        JavadocComment comment = new JavadocComment(commentStr);
        type.setComment(comment);
        return this;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.