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

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

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

origin: fenix-framework/fenix-framework

protected String getCollectionTypeFor(Role role) {
  boolean indexed = (role.getIndexProperty() != null);
  boolean ordered = role.isOrdered();
  if (indexed && ordered) {
    throw new Error("Can't handle roles that are both indexed and ordered");
  }
  String elemsType = getTypeFullName(role.getType());
  if (indexed) {
    // FIXME: the type of the key should correspond to the type of the index property
    return makeGenericType("java.util.Map", "java.lang.Object", elemsType);
  } else {
    return makeGenericType("java.util.Set", elemsType);
  }
}
origin: fenix-framework/fenix-framework

protected String getDefaultCollectionGetterFor(Role role) {
  return makeGenericType(DomainBasedMap.Getter.class.getCanonicalName(), getTypeFullName(role.getType()));
}
origin: fenix-framework/fenix-framework

protected String getSetTypeDeclarationFor(Role role) {
  String elemType = getTypeFullName(role.getType());
  return makeGenericType("java.util.Set", elemType);
}
origin: fenix-framework/fenix-framework

protected void generateRelationGetter(String getterName, Role role, PrintWriter out) {
  String paramListType = makeGenericType("java.util.Set", getTypeFullName(role.getType()));
  generateRelationGetter(getterName, role, paramListType, out);
}
origin: fenix-framework/fenix-framework

protected String getDefaultCollectionFor(Role role) {
  return makeGenericType(getCollectionToUse(), role.getType().getFullName());
}
origin: fenix-framework/fenix-framework

protected String getConcreteSetTypeDeclarationFor(Role role) {
  String elemType = getTypeFullName(role.getType());
  String thisType = getTypeFullName(role.getOtherRole().getType());
  return makeGenericType(getRelationAwareBaseTypeFor(role), thisType, elemType);
}
origin: fenix-framework/fenix-framework

protected String getRoleType(Role role) {
  return makeGenericType(getRoleBaseType(role), getTypeFullName(role.getOtherRole().getType()),
      getTypeFullName(role.getType()));
}
origin: fenix-framework/fenix-framework

protected String getRelationAwareTypeFor(Role role) {
  String elemType = getTypeFullName(role.getType());
  String thisType = getTypeFullName(role.getOtherRole().getType());
  return makeGenericType(getRelationAwareBaseTypeFor(role), thisType, elemType);
}
origin: fenix-framework/fenix-framework

protected void generateRoleMethodGetInverseRole(Role role, Role otherRole, PrintWriter out) {
  // the getInverseRole method
  String inverseRoleType =
      makeGenericType("pt.ist.fenixframework.dml.runtime.Role", getTypeFullName(role.getType()),
          getTypeFullName(otherRole.getType()));
  printMethod(out, "public", inverseRoleType, "getInverseRole");
  startMethodBody(out);
  print(out, "return ");
  if (otherRole.getName() == null) {
    print(out, "new ");
    print(out, getRoleType(otherRole));
    print(out, "(this)");
  } else {
    print(out, getRoleHandlerName(otherRole, true));
  }
  print(out, ";");
  endMethodBody(out);
}
origin: fenix-framework/fenix-framework

protected void generateStaticRoleSlotsMultStar(Role role, Role otherRole, PrintWriter out) {
  print(out, "public ");
  print(out, makeGenericType("pt.ist.fenixframework.dml.runtime.RelationBaseSet", getTypeFullName(role.getType())));
  print(out, " ");
  print(out, "getSet(");
  print(out, getTypeFullName(otherRole.getType()));
  print(out, " o1)");
  startMethodBody(out);
  print(out, "return (" + getConcreteSetTypeDeclarationFor(role) + ") ((");
  print(out, otherRole.getType().getBaseName());
  print(out, ") o1).");
  print(out, role.getName());
  print(out, ";");
  endMethodBody(out);
}
pt.ist.fenixframework.dmlCodeGeneratormakeGenericType

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
  • CodeWhisperer alternatives
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