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

Examples of org.openquark.cal.internal.javamodel.JavaStatement.JavaDocComment.addLine()


                    EMPTY_TYPE_NAME_ARRAY);
               
       
        // Set the JavaDoc for the class.
        JavaDocComment jdc = new JavaDocComment("This inner class (" + TYPECLASS_CLASS_NAME + ") contains constants");
        jdc.addLine("and methods related to binding to CAL TypeClasses in the " + moduleTypeInfo.getModuleName() + " module.");
        typeClassClass.setJavaDoc(jdc);

        // Build up a list of TypeClass names and sort.
        List<String> typeClassNames = new ArrayList<String>();
        for (int i = 0, n = moduleTypeInfo.getNTypeClasses(); i < n; ++i) {
View Full Code Here


                javaClassRep.setComment(mlc);
               
                // We want to insert the CALDoc comment for the type as a JavaDoc comment for the class.
                JavaDocComment jdc =
                    new JavaDocComment ("This class (" + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + ") provides a Java data class corresponding to");
                    jdc.addLine("the CAL type constructor " + typeConstructorInfo.typeConstructor.getName() + ".");
                    jdc.addLine("");
                   
                if (typeConstructorInfo.isEnumerationType) {
                    jdc.addLine("This type constructor is an enumeration. (i.e. all data constructors have no fields)");
                    jdc.addLine("The individual data constructors are represented by instances of " + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + " held ");
View Full Code Here

               
                // We want to insert the CALDoc comment for the type as a JavaDoc comment for the class.
                JavaDocComment jdc =
                    new JavaDocComment ("This class (" + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + ") provides a Java data class corresponding to");
                    jdc.addLine("the CAL type constructor " + typeConstructorInfo.typeConstructor.getName() + ".");
                    jdc.addLine("");
                   
                if (typeConstructorInfo.isEnumerationType) {
                    jdc.addLine("This type constructor is an enumeration. (i.e. all data constructors have no fields)");
                    jdc.addLine("The individual data constructors are represented by instances of " + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + " held ");
                    jdc.addLine("in static final fields.");
View Full Code Here

                    new JavaDocComment ("This class (" + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + ") provides a Java data class corresponding to");
                    jdc.addLine("the CAL type constructor " + typeConstructorInfo.typeConstructor.getName() + ".");
                    jdc.addLine("");
                   
                if (typeConstructorInfo.isEnumerationType) {
                    jdc.addLine("This type constructor is an enumeration. (i.e. all data constructors have no fields)");
                    jdc.addLine("The individual data constructors are represented by instances of " + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + " held ");
                    jdc.addLine("in static final fields.");
                } else {
                    jdc.addLine("Because the type constructor has only one data constructor, with the same name");
                    jdc.addLine("as the type constructor this class also represents instances of the data constructor.");
View Full Code Here

                    jdc.addLine("the CAL type constructor " + typeConstructorInfo.typeConstructor.getName() + ".");
                    jdc.addLine("");
                   
                if (typeConstructorInfo.isEnumerationType) {
                    jdc.addLine("This type constructor is an enumeration. (i.e. all data constructors have no fields)");
                    jdc.addLine("The individual data constructors are represented by instances of " + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + " held ");
                    jdc.addLine("in static final fields.");
                } else {
                    jdc.addLine("Because the type constructor has only one data constructor, with the same name");
                    jdc.addLine("as the type constructor this class also represents instances of the data constructor.");
                }
View Full Code Here

                    jdc.addLine("");
                   
                if (typeConstructorInfo.isEnumerationType) {
                    jdc.addLine("This type constructor is an enumeration. (i.e. all data constructors have no fields)");
                    jdc.addLine("The individual data constructors are represented by instances of " + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + " held ");
                    jdc.addLine("in static final fields.");
                } else {
                    jdc.addLine("Because the type constructor has only one data constructor, with the same name");
                    jdc.addLine("as the type constructor this class also represents instances of the data constructor.");
                }
               
View Full Code Here

                if (typeConstructorInfo.isEnumerationType) {
                    jdc.addLine("This type constructor is an enumeration. (i.e. all data constructors have no fields)");
                    jdc.addLine("The individual data constructors are represented by instances of " + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + " held ");
                    jdc.addLine("in static final fields.");
                } else {
                    jdc.addLine("Because the type constructor has only one data constructor, with the same name");
                    jdc.addLine("as the type constructor this class also represents instances of the data constructor.");
                }
               
                javaClassRep.setJavaDoc(jdc);
               
View Full Code Here

                    jdc.addLine("This type constructor is an enumeration. (i.e. all data constructors have no fields)");
                    jdc.addLine("The individual data constructors are represented by instances of " + javaClassRep.getClassName().getUnqualifiedJavaSourceName() + " held ");
                    jdc.addLine("in static final fields.");
                } else {
                    jdc.addLine("Because the type constructor has only one data constructor, with the same name");
                    jdc.addLine("as the type constructor this class also represents instances of the data constructor.");
                }
               
                javaClassRep.setJavaDoc(jdc);
               
                // Generate fields in this class for any fields which are common to all data constructors.
View Full Code Here

               
                fromOrdinal.addStatement(switchStatement);
               
                JavaDocComment jdc =
                    new JavaDocComment ("@param ordinal");
                jdc.addLine("@return the instance of " + typeConstructorInfo.javaClassName + " corresponding to the given ordinal.");
                fromOrdinal.setJavaDocComment(jdc);
               
                return fromOrdinal;
            }
           
View Full Code Here

            jdc = new JavaDocComment (convertedComment);
        } else {
            // If there is no module comment from the CAL source we should just
            // create a generic one.
            jdc = new JavaDocComment ("This class (" + bindingClassName + ") provides Java constants, methods, etc.");
            jdc.addLine("which make it easier to bind client Java code to the Java code generated");
            jdc.addLine("from CAL source in a safe fashion");
        }
       
        bindingClass.setJavaDoc(jdc);
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.