Tabnine Logo
ClassTemplateSpec.createFromDataSchema
Code IndexAdd Tabnine to your IDE (free)

How to use
createFromDataSchema
method
in
com.linkedin.pegasus.generator.spec.ClassTemplateSpec

Best Java code snippets using com.linkedin.pegasus.generator.spec.ClassTemplateSpec.createFromDataSchema (Showing top 6 results out of 315)

origin: org.coursera.courier/courier-generator-api

private ClassTemplateSpec createFromDataSchema(DataSchema schema)
{
 if (schema instanceof MapDataSchema)
 {
  return new CourierMapTemplateSpec((MapDataSchema) schema);
 }
 return ClassTemplateSpec.createFromDataSchema(schema);
}
origin: org.coursera.courier/courier-typescript-lite-generator

/** Convenience wrapper around {@link #createTypeSyntax(ClassTemplateSpec)}. */
private TSTypeSyntax createTypeSyntax(DataSchema schema) {
 return createTypeSyntax(ClassTemplateSpec.createFromDataSchema(schema));
}
origin: org.coursera.courier/courier-typescript-lite-generator

 private ClassTemplateSpec _refType() {
  return ClassTemplateSpec.createFromDataSchema(_dataSchema.getRef());
 }
}
origin: org.coursera.courier/courier-swift-generator

private static String toUnionLiteral(DataMap unionMap, UnionDataSchema unionSchema) {
 Iterator<Map.Entry<String, Object>> iter = unionMap.entrySet().iterator();
 if (!iter.hasNext()) {
  throw new IllegalArgumentException();
 }
 Map.Entry<String, Object> entry = iter.next();
 DataSchema memberType = unionSchema.getTypeByName(entry.getKey());
 if (memberType == null) {
  throw new IllegalArgumentException("Unrecognized union member in literal: " + entry.getKey());
 }
 StringBuilder sb = new StringBuilder();
 sb.append(".");
 sb.append(toUnionMemberName(ClassTemplateSpec.createFromDataSchema(memberType)));
 sb.append("(");
 sb.append(toLiteral(memberType, entry.getValue()));
 sb.append(")");
 return sb.toString();
}
origin: org.coursera.courier/courier-swift-generator

private ClassTemplateSpec getDereferencedType(CustomInfoSpec customInfo, ClassTemplateSpec fallback) {
 if (customInfo != null) {
  DataSchema refSchema = customInfo.getCustomSchema().getDereferencedDataSchema();
  return ClassTemplateSpec.createFromDataSchema(refSchema);
 } else {
  return fallback;
 }
}
origin: org.coursera.courier/courier-swift-generator

if (customInfo != null) {
 DataSchema refSchema = customInfo.getCustomSchema().getDereferencedDataSchema();
 fieldType = ClassTemplateSpec.createFromDataSchema(refSchema);
 String coercer = customInfo.getCoercerClass().getClassName();
 String uncoerced = toLiteral(fieldType.getSchema(), field.getSchemaField().getDefault());
com.linkedin.pegasus.generator.specClassTemplateSpeccreateFromDataSchema

Popular methods of ClassTemplateSpec

  • getFullName
  • getSchema
  • getClassName
  • getNamespace
  • getOriginalTyperefSchema
  • <init>
  • getBindingName
  • getEnclosingClass
  • setClassName
  • setEnclosingClass
  • setFullName
  • setLocation
  • setFullName,
  • setLocation,
  • setModifiers,
  • setNamespace,
  • setOriginalTyperefSchema

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • runOnUiThread (Activity)
  • findViewById (Activity)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • 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