Package org.openquark.cal.internal.javamodel

Examples of org.openquark.cal.internal.javamodel.JavaMethod.addThrows()


            // Add the method to the class.
            JavaMethod javaMethod = new JavaMethod(modifiers, JavaTypeNames.RTVALUE, argNames, argTypes, null, methodName);
            javaClassRep.addMethod(javaMethod);

            // 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);
View Full Code Here


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

            // Add statistics generation.
            addStatsBlock (javaMethod, javaDefn);

            // Add the body
View Full Code Here

            // Add the method to the class.
            JavaMethod javaMethod = new JavaMethod(modifiers, JavaTypeNames.RTVALUE, argNames, argTypes, null, methodName);
            javaClassRep.addMethod(javaMethod);

            // 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);
View Full Code Here

                                                JavaTypeNames.RTVALUE,
                                                SCJavaDefn.EXECUTION_CONTEXT_NAME,
                                                JavaTypeNames.RTEXECUTION_CONTEXT,
                                                false, "reduce");
            // Add the throws declaration
            reduce.addThrows(JavaTypeName.CAL_EXECUTOR_EXCEPTION);

            // Add the body.
            // if (result == null) {
            //     setResult (
            //         function.f4S(
View Full Code Here

            // Add the method to the class.
            JavaMethod javaMethod = new JavaMethod(modifiers, JavaTypeNames.RTVALUE, new String[]{"deepSeq", "rhs"}, new JavaTypeName[]{JavaTypeNames.RTSUPERCOMBINATOR, JavaTypeNames.RTVALUE}, null, "buildDeepSeq");
            javaClassRep.addMethod(javaMethod);

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

            // Add the method body.
            // Evaluate each child.
            JavaExpression rhs = METHODVAR_RHS;
View Full Code Here

            //     .evaluate(executionContext).getOpaqueValue();
            method.addStatement(new JavaStatement.ReturnStatement(makeRTValueUnmarshallingExpr(returnType, resultExpr)));
        }
       
        // Add the throws declaration
        method.addThrows(JavaTypeName.CAL_EXECUTOR_EXCEPTION);
       
        // Add the Javadoc
        method.setJavaDocComment(
            new JavaDocComment(CALDocToJavaDocUtilities.getJavadocFromCALDocComment(
                functionalAgent.getCALDocComment(), false, functionalAgent, functionalAgentType,
View Full Code Here

        //
        // public static void main(final String[] args) throws CALExecutorException
        //
        final JavaMethod mainMethod = new JavaMethod(Modifier.PUBLIC|Modifier.STATIC, JavaTypeName.VOID, ARGS_PARAMETER_NAME, JavaTypeName.STRING_ARRAY, true, "main");
       
        mainMethod.addThrows(JavaTypeName.CAL_EXECUTOR_EXCEPTION);
       
        ////
        /// The classes in the standalone JAR are generated with the machine configuration at "build time".
        /// We capture this configuration into a StandaloneJarGeneratedCodeInfo, to be checked at runtime
        /// against the machine configuration then.
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.