Package org.openquark.cal.internal.javamodel.JavaStatement

Examples of org.openquark.cal.internal.javamodel.JavaStatement.MultiLineComment


    /* (non-Javadoc)
     * @see org.openquark.cal.internal.runtime.lecc.JavaModelVisitor#visitLineCommentStatement(org.openquark.cal.internal.runtime.lecc.JavaStatement.MultiLineComment, java.lang.Object)
     */
    public JavaStatement visitMultiLineCommentStatement(MultiLineComment lineComment, T arg) {
        return new MultiLineComment (lineComment);
    }
View Full Code Here


        if (jdc != null) {
            JavaDocComment newJDC = (JavaDocComment)jdc.accept(this, arg);
            newClassRep.setJavaDoc(newJDC);
        }
       
        MultiLineComment mlc = classRep.getComment();
        if (mlc != null) {
            MultiLineComment newMlc = (MultiLineComment)mlc.accept(this, arg);
            newClassRep.setComment(newMlc);
        }
       
        return newClassRep;
    }
View Full Code Here

            LineComment lineComment = (LineComment)statement;
            emitLine(sb, indent, "// " + lineComment.getCommentText());

        } else if (statement instanceof MultiLineComment) {
            boolean isJavaDoc = (statement instanceof JavaDocComment);
            MultiLineComment jdc = (MultiLineComment)statement;

            Iterator<String> it = jdc.getCommentLines().iterator();
            String firstLine = it.next();
            boolean nd = !firstLine.startsWith("/*");
            if (nd) {
                emitLine(sb, indent, isJavaDoc ? "/**" : "/*");
            }
            it = jdc.getCommentLines().iterator();
            while (it.hasNext()) {
                String line = it.next();
                if (nd) {
                    emitLine(sb, indent, " * " + line);
                } else {
View Full Code Here

        final JavaDocComment jdc = classRep.getJavaDoc();
        if (jdc != null && continueTraversal) {
            jdc.accept(this, arg);
        }
       
        final MultiLineComment mlc = classRep.getComment();
        if (mlc != null && continueTraversal) {
            mlc.accept(this, arg);
        }
       
        return null;
    }
View Full Code Here

        }
       
        bindingClass.setJavaDoc(jdc);

        // Add a comment for the top of the source file.
        MultiLineComment mlc = new MultiLineComment("<!--");
        mlc.addLine(" ");
        mlc.addLine("**************************************************************");
        mlc.addLine("This Java source has been automatically generated.");
        mlc.addLine("MODIFICATIONS TO THIS SOURCE MAY BE OVERWRITTEN - DO NOT MODIFY THIS FILE");
        mlc.addLine("**************************************************************");
        mlc.addLine(" ");
        mlc.addLine(" ");
        mlc.addLine("This file (" + bindingClass.getClassName().getUnqualifiedJavaSourceName() + ".java)");
        mlc.addLine("was generated from CAL module: " + module.getName() + ".");
        mlc.addLine("The constants and methods provided are intended to facilitate accessing the");
        mlc.addLine(module.getName() + " module from Java code.");
        mlc.addLine(" ");
        mlc.addLine("Creation date: " + new Date());
        mlc.addLine("--!>");
        mlc.addLine(" ");
        bindingClass.setComment(mlc);
       
        // Add the module name field.
        JavaFieldDeclaration moduleNameDeclaration =
            new JavaFieldDeclaration (PUBLIC_STATIC_FINAL, JavaTypeName.MODULE_NAME, MODULE_NAME_FIELD_NAME,
View Full Code Here

                addClass = true;
               
                // If this is the first DC for the data type we want a non JavaDoc comment
                // indicating the data type.
                if (!commentAdded) {
                    MultiLineComment mlc = new MultiLineComment("DataConstructors for the " + typeCons.getName().getQualifiedName() + " data type.");
                    dataConstructorsClass.addComment(mlc);
                    commentAdded = true;
                }

                // Get the types of the data constructor fields.
View Full Code Here

                            superClassTypeName,
                            classModifiers,
                            interfaces);
               
                // Add a comment for the top of the source file.
                MultiLineComment mlc = new MultiLineComment("<!--");
                mlc.addLine(" ");
                mlc.addLine("**************************************************************");
                mlc.addLine("This Java source has been automatically generated.");
                mlc.addLine("MODIFICATIONS TO THIS SOURCE MAY BE OVERWRITTEN - DO NOT MODIFY THIS FILE");
                mlc.addLine("**************************************************************");
                mlc.addLine(" ");
                mlc.addLine(" ");
                mlc.addLine("This file (" + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + ".java)");
                mlc.addLine("was generated from CAL type constructor: " + typeConstructorInfo.typeConstructor.getName() + ".");
                mlc.addLine(" ");
                mlc.addLine("Creation date: " + new Date());
                mlc.addLine("--!>");
                mlc.addLine(" ");
               
                javaClassRep.setComment(mlc);
               
                // We want to insert the CALDoc comment for the type as a JavaDoc comment for the class.
                JavaDocComment jdc =
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.javamodel.JavaStatement.MultiLineComment

Copyright © 2018 www.massapicom. 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.