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

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


        } 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);

        // Add a comment for the top of the source file.
View Full Code Here


        int javaDocHash = computeJavaDocHash(bindingClass);
       
        JavaFieldDeclaration javaDocHashField =
            new JavaFieldDeclaration(PUBLIC_STATIC_FINAL, JavaTypeName.INT, JavaBindingGenerator.JAVADOC_HASH_FIELD_NAME, LiteralWrapper.make(Integer.valueOf(javaDocHash)));
        JavaDocComment javaDocHashFieldComment = new JavaDocComment("A hash of the concatenated JavaDoc for this class (including inner classes).");
        javaDocHashFieldComment.addLine("This value is used when checking for changes to generated binding classes.");
        javaDocHashField.setJavaDoc(javaDocHashFieldComment);
        bindingClass.addFieldDeclaration(javaDocHashField);
       
        return bindingClass;
    }
View Full Code Here

                    PUBLIC_STATIC_FINAL,
                    EMPTY_TYPE_NAME_ARRAY);

        // Add the class JavaDoc
        JavaDocComment jdc = new JavaDocComment("This inner class (" + FUNCTION_CLASS_NAME + ") contains constants");
        jdc.addLine("and methods related to binding to CAL functions in the " + moduleTypeInfo.getModuleName() + " module.");
        functionsClass.setJavaDoc(jdc);
       
        // Build up and sort the list of function names.
        Map<String, FunctionalAgent> nameToFuncInfo = new TreeMap<String, FunctionalAgent>();
        for (int i = 0, n = moduleTypeInfo.getNFunctions(); i < n; ++i) {
View Full Code Here

                funcComment = new JavaDocComment(calDocCommentToJavaComment(cdc, functionalAgent, false));
                funcComment = fixupJavaDoc(funcComment, origParamNames, paramNames);
            } else {
                funcComment = new JavaDocComment("Helper binding method for function: " + calFuncName + ". ");
                for (int iName = 0; iName < paramNames.length; ++iName) {
                    funcComment.addLine("@param " + paramNames[iName]);
                }
                funcComment.addLine("@return the SourceModule.expr representing an application of " + calFuncName);
            }
           
           
View Full Code Here

                // Add the throws declaration
                javaMethod.addThrows(JavaTypeName.CAL_EXECUTOR_EXCEPTION);

                final JavaDocComment comment = new JavaDocComment(methodName);
                comment.addLine("This method implements the function logic of the CAL function " + javaDefn.getModuleName() + "." + javaDefn.getFunctionName());
                javaMethod.setJavaDocComment(comment);
            }

            javaClassRep.addMethod(javaMethod);
View Full Code Here

            // Add the throws declaration
            javaMethod.addThrows(JavaTypeName.CAL_EXECUTOR_EXCEPTION);

            JavaDocComment comment = new JavaDocComment(methodName);
            comment.addLine("This method implements the function logic of the CAL function " + javaDefn.getModuleName() + "." + javaDefn.getFunctionName());
            javaMethod.setJavaDocComment(comment);

            // Add statistics generation.
            addStatsBlock (javaMethod, javaDefn);
View Full Code Here

            javaClassRep.addMethod(javaMethod);

            // Add a comment indicating which CAL function this
            // corresponds to.
            JavaDocComment comment = new JavaDocComment(methodName);
            comment.addLine("This method implements the logic of the CAL function " + javaDefn.getModuleName() + "." + javaDefn.getFunctionName());
            comment.addLine("This version of the logic returns an unboxed value.");
            javaMethod.setJavaDocComment(comment);

            // Add the throws declaration
            javaMethod.addThrows(JavaTypeName.CAL_EXECUTOR_EXCEPTION);
View Full Code Here

            // Add a comment indicating which CAL function this
            // corresponds to.
            JavaDocComment comment = new JavaDocComment(methodName);
            comment.addLine("This method implements the logic of the CAL function " + javaDefn.getModuleName() + "." + javaDefn.getFunctionName());
            comment.addLine("This version of the logic returns an unboxed value.");
            javaMethod.setJavaDocComment(comment);

            // Add the throws declaration
            javaMethod.addThrows(JavaTypeName.CAL_EXECUTOR_EXCEPTION);
View Full Code Here

            // Add the throws declaration
            javaMethod.addThrows(JavaTypeName.CAL_EXECUTOR_EXCEPTION);

            JavaDocComment comment = new JavaDocComment(methodName);
            comment.addLine("This method implements the function logic of the CAL function " + javaDefn.getModuleName() + "." + javaDefn.getFunctionName());
            javaMethod.setJavaDocComment(comment);

            if (consolidateFunctions) {
                JavaExpression[] args = new JavaExpression[arity + 1];
                argTypes = new JavaTypeName[arity + 1];
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.