Tabnine Logo
CodeGenerator.printWords
Code IndexAdd Tabnine to your IDE (free)

How to use
printWords
method
in
pt.ist.fenixframework.dml.CodeGenerator

Best Java code snippets using pt.ist.fenixframework.dml.CodeGenerator.printWords (Showing top 16 results out of 315)

origin: fenix-framework/fenix-framework

protected void printConstructor(PrintWriter out, String mods, String name, String... args) {
  printWords(out, mods, name);
  printArguments(out, args);
}
origin: fenix-framework/fenix-framework

protected void printMethod(PrintWriter out, String mods, String type, String name, String... args) {
  printWords(out, mods, type, name);
  printArguments(out, args);
}
origin: fenix-framework/fenix-framework

protected void generateSlotDeclaration(PrintWriter out, String type, String name) {
  printWords(out, "private", type, name);
  println(out, ";");
}
origin: fenix-framework/fenix-framework

protected void generatePackageDecl(String subPackageName, PrintWriter out) {
  String topPackageName = getPackageName();
  if ((topPackageName.length() + subPackageName.length()) > 0) {
    printWords(out, "package");
    printWords(out, topPackageName);
    if ((topPackageName.length() > 0) && (subPackageName.length() > 0)) {
      print(out, ".");
    }
    print(out, subPackageName);
    print(out, ";");
    newline(out);
    newline(out);
  }
}
origin: fenix-framework/fenix-framework

protected void generateGetterBody(String slotName, String typeName, PrintWriter out) {
  if (isDefaultCodeGenerator()) {
    printUnsupported(out);
  } else {
    printWords(out, "return", getSlotExpression(slotName) + ";");
  }
}
origin: fenix-framework/fenix-framework

protected void generateBaseClass(DomainClass domClass, PrintWriter out) {
  newline(out);
  println(out, "@SuppressWarnings(\"all\")");
  // This should be the other way around, but that would cause API disruption
  String modifier = domClass.hasModifier(Modifier.PROTECTED) ? "" : "public";
  printWords(out, modifier, "abstract", "class", domClass.getBaseName(), "extends");
  String superclassName = getEntityFullName(domClass.getSuperclass());
  printWords(out, (superclassName == null) ? getDomainClassRoot() : superclassName);
  final List interfacesNames = domClass.getInterfacesNames();
  if (interfacesNames != null && !interfacesNames.isEmpty()) {
    printWords(out, "implements");
    for (final Object ifsn : interfacesNames) {
      printWords(out, ifsn.toString());
    }
  }
  newBlock(out);
  generateBaseClassBody(domClass, out);
  closeBlock(out);
}
origin: fenix-framework/fenix-framework

protected void generateStaticRoleSlotsMultOneGetterBody(Role role, Role otherRole, PrintWriter out) {
  printWords(out, "return", "((" + otherRole.getType().getBaseName() + ")o1)." + role.getName() + ";");
}
origin: fenix-framework/fenix-framework

protected void generateStaticRoleSlotsMultOneSetterBody(Role role, Role otherRole, PrintWriter out) {
  printWords(out, "((" + otherRole.getType().getBaseName() + ")o1)." + role.getName() + " = o2;");
}
origin: fenix-framework/fenix-framework

protected void generateSetterBody(String setterName, Slot slot, PrintWriter out) {
  if (isDefaultCodeGenerator()) {
    printUnsupported(out);
  } else {
    printWords(out, getSlotSetterExpression(slot, slot.getName()) + ";");
  }
}
origin: fenix-framework/fenix-framework

protected void generateRoleSlot(Role role, PrintWriter out) {
  onNewline(out);
  if (role.getMultiplicityUpper() == 1) {
    printWords(out, "private", getTypeFullName(role.getType()), role.getName());
  } else {
    printWords(out, "private", getDefaultCollectionFor(role), role.getName());
  }
  println(out, ";");
}
origin: fenix-framework/fenix-framework

protected void generateCurrentBackEndIdClass(String className, PrintWriter out) {
  println(out, "@SuppressWarnings(\"all\")");
  printWords(out, "public", "class", className, "extends", ABSTRACT_BACKEND_ID_CLASS);
  newBlock(out);
  generateBackEndIdClassBody(out);
  closeBlock(out);
}
origin: fenix-framework/fenix-framework

protected void generateSlot(Slot slot, PrintWriter out) {
  onNewline(out);
  printWords(out, "private", slot.getTypeName(), slot.getName());
  print(out, ";");
}
origin: fenix-framework/fenix-framework

protected void generatePublicClass(DomainClass domClass, PrintWriter out) {
  String leafClassName = domClass.getName();
  // This should be the other way around, but that would cause API disruption
  String modifier = domClass.hasModifier(Modifier.PROTECTED) ? "" : "public";
  printWords(out, modifier, "class", leafClassName, "extends", domClass.getBaseName());
  newBlock(out);
  generatePublicClassConstructors(leafClassName, out);
  closeBlock(out);
}
origin: fenix-framework/fenix-framework

printMethod(out, "public", "String", "getBackEndName");
startMethodBody(out);
printWords(out, "return", "\"" + getBackEndName() + "\";");
endMethodBody(out);
print(out, "try");
newBlock(out);
printWords(out, "return", "(Class<? extends pt.ist.fenixframework.Config>)Class.forName(\"" + getDefaultConfigClassName()
    + "\");");
closeBlock(out);
printWords(out, "catch", "(Exception e)");
newBlock(out);
print(out, "throw new RuntimeException(e);");
printMethod(out, "public", "Class<? extends pt.ist.fenixframework.core.AbstractDomainObject>", "getDomainClassRoot");
startMethodBody(out);
printWords(out, "return", getDomainClassRoot() + ".class;");
endMethodBody(out);
startMethodBody(out);
if (compArgs.getAppName() == null) {
  printWords(out, "return null;");
} else {
  printWords(out, "return \"" + compArgs.getAppName() + "\";");
origin: fenix-framework/fenix-framework

protected void generateStaticRoleSlots(Role role, PrintWriter out) {
  onNewline(out);
  Role otherRole = role.getOtherRole();
  // The Role slot
  String roleType = getRoleType(role);
  printWords(out, "public", "final", "static", roleType, getRoleHandlerName(role, false), "=", "new", roleType);
  print(out, "(");
  print(out, getRoleArgs(role));
  print(out, ")");
  newBlock(out);
  boolean multOne = (role.getMultiplicityUpper() == 1);
  if (multOne) {
    generateStaticRoleSlotsMultOne(role, otherRole, out);
  } else {
    generateStaticRoleSlotsMultStar(role, otherRole, out);
  }
  generateRoleMethodGetInverseRole(role, otherRole, out);
  closeBlock(out, false);
  println(out, ";");
}
origin: fenix-framework/fenix-framework

startMethodBody(out);
if (isDefaultCodeGenerator()) {
  printWords(out, "return", "new", "pt.ist.fenixframework.dml.runtime.DirectRelation(null, null)");
  print(out, ";");
} else {
pt.ist.fenixframework.dmlCodeGeneratorprintWords

Popular methods of CodeGenerator

  • generateBaseClassBody
  • generateBaseClassConstructorsBody
  • generateInitRoleSlot
  • generateRoleSlotMethods
  • generateRoleSlotMethodsMultOne
  • generateSetterBody
  • generateSlotAccessors
  • generateStaticRelationSlots
  • getRoleArgs
  • capitalize
  • chooseVisibilityModifier
  • closeBlock
  • chooseVisibilityModifier,
  • closeBlock,
  • comment,
  • endMethodBody,
  • findWrapperEntry,
  • generateBackEndId,
  • generateBackEndIdClassBody,
  • generateBaseClass,
  • generateClasses,
  • generateCode

Popular in Java

  • Reactive rest calls using spring rest template
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • Menu (java.awt)
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Notification (javax.management)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now