Package org.openquark.cal.internal.javamodel

Examples of org.openquark.cal.internal.javamodel.JavaClassRep.addMethod()


                    // Add static final fields for each data constructor
                    createFields_Enumeration(typeConstructorInfo.typeConstructor, javaClassRep, typeConstructorClassName);

                    // Add a function which takes an int value for the
                    // ordinal and returns the corresponding enum instance.
                    javaClassRep.addMethod(createMethod_fromOrdinal (typeConstructorClassName));
                }
               
                if (typeConstructorInfo.commonFieldNames.size() > 0) {
                    javaClassRep.addConstructor(createConstructor(typeConstructorInfo, typeConstructorClassName));
                } else {
View Full Code Here


                                accessorMethodName,
                                javaFieldName,
                                type,
                                true);
                       
                        javaClassRep.addMethod(getter);
                       
                        getter.setJavaDocComment(new JavaDocComment ("@return " + fieldName));
                    }
                }
               
View Full Code Here

                        getter.setJavaDocComment(new JavaDocComment ("@return " + fieldName));
                    }
                }
               
   
                javaClassRep.addMethod(createMethod_getDCName(typeConstructorInfo));
               
                javaClassRep.addMethod(createMethod_getDCOrdinal(typeConstructorInfo));
               
                JavaMethod toString = createMethod_toString();
                if (toString != null) {
View Full Code Here

                }
               
   
                javaClassRep.addMethod(createMethod_getDCName(typeConstructorInfo));
               
                javaClassRep.addMethod(createMethod_getDCOrdinal(typeConstructorInfo));
               
                JavaMethod toString = createMethod_toString();
                if (toString != null) {
                    javaClassRep.addMethod (toString);
                }
View Full Code Here

               
                javaClassRep.addMethod(createMethod_getDCOrdinal(typeConstructorInfo));
               
                JavaMethod toString = createMethod_toString();
                if (toString != null) {
                    javaClassRep.addMethod (toString);
                }
               
                if (typeConstructorInfo.isEnumerationType) {
                    JavaMethod equals = JavaDataClassGenerator.this.createMethod_equals(
                            typeConstructorClassName,
View Full Code Here

                    JavaMethod equals = JavaDataClassGenerator.this.createMethod_equals(
                            typeConstructorClassName,
                            typeConstructorInfo.commonFieldNames,
                            typeConstructorInfo.commonFieldTypes);

                    javaClassRep.addMethod (equals);
                }
               
                createMethod_hashCode (javaClassRep);
               
                return javaClassRep;
View Full Code Here

               
                createFields (dcClass, dc, typeConstructorInfo);
               
                dcClass.addConstructor(createConstructor(dc, typeConstructorInfo, dcClassTypeName));
               
                dcClass.addMethod(createMethod_getDCName(dc.getName().getUnqualifiedName()));
   
                for (FieldName fieldName : dcInfo.fieldTypeNames.keySet()) {
                    if (typeConstructorInfo.commonFieldNames.contains(fieldName)) {
                        continue;
                    }
View Full Code Here

                    String javaFieldName = (String)typeConstructorInfo.fieldJavaNames.get(fieldName);
                   
                    String accessorName = (String)typeConstructorInfo.fieldJavaAccessorMethodNames.get(fieldName);
                    JavaMethod getter = createMethod_getField(accessorName, javaFieldName, fieldType, true);
                   
                    dcClass.addMethod(getter);
                }
   
                dcClass.addMethod(createMethod_getDCOrdinal(dc.getOrdinal()));

                dcClass.addMethod (JavaDataClassGenerator.this.createMethod_toString(dcInfo.allFieldNames, dcInfo.fieldTypeNames));
View Full Code Here

                    JavaMethod getter = createMethod_getField(accessorName, javaFieldName, fieldType, true);
                   
                    dcClass.addMethod(getter);
                }
   
                dcClass.addMethod(createMethod_getDCOrdinal(dc.getOrdinal()));

                dcClass.addMethod (JavaDataClassGenerator.this.createMethod_toString(dcInfo.allFieldNames, dcInfo.fieldTypeNames));

                dcClass.addMethod (
                        JavaDataClassGenerator.this.createMethod_equals(
View Full Code Here

                    dcClass.addMethod(getter);
                }
   
                dcClass.addMethod(createMethod_getDCOrdinal(dc.getOrdinal()));

                dcClass.addMethod (JavaDataClassGenerator.this.createMethod_toString(dcInfo.allFieldNames, dcInfo.fieldTypeNames));

                dcClass.addMethod (
                        JavaDataClassGenerator.this.createMethod_equals(
                                dcClassTypeName,
                                dcInfo.allFieldNames,
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.