congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ClassTemplateSpec.getOriginalTyperefSchema
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.coursera.courier/courier-typescript-lite-generator

 public TSProperties lookupTSProperties(ClassTemplateSpec templateSpec) {
  DataSchema schema = templateSpec.getSchema();
  if (templateSpec instanceof UnionTemplateSpec && templateSpec.getOriginalTyperefSchema() != null) {
   schema = templateSpec.getOriginalTyperefSchema();
  }

  if (schema == null) {
   return defaults;
  } else {
   Object typescript = schema.getProperties().get("typescript");
   if (typescript == null || !(typescript instanceof DataMap)) {
    return defaults;
   }
   DataMap properties = ((DataMap) typescript);

   String optionalityString = properties.getString("optionality");

   TSProperties.Optionality optionality =
     optionalityString == null ? defaults.optionality : TSProperties.Optionality.valueOf(optionalityString);

   Boolean maybeEquatable = properties.getBoolean("equatable");
   boolean equatable =  maybeEquatable == null ? defaults.equatable : maybeEquatable;

   Boolean maybeOmit = properties.getBoolean("omit");
   boolean omit = maybeOmit == null ? defaults.omit : maybeOmit;

   return new TSProperties(optionality, equatable, omit);
  }
 }
}
origin: org.coursera.courier/courier-swift-generator

 public SwiftProperties lookupSwiftProperties(ClassTemplateSpec templateSpec) {
  DataSchema schema = templateSpec.getSchema();
  if (templateSpec instanceof UnionTemplateSpec && templateSpec.getOriginalTyperefSchema() != null) {
   schema = templateSpec.getOriginalTyperefSchema();
  }

  if (schema == null) {
   return defaults;
  } else {
   Object swift = schema.getProperties().get("swift");
   if (swift == null || !(swift instanceof DataMap)) {
    return defaults;
   }
   DataMap properties = ((DataMap) swift);

   String optionalityString = properties.getString("optionality");

   SwiftProperties.Optionality optionality =
     optionalityString == null ? defaults.optionality : SwiftProperties.Optionality.valueOf(optionalityString);

   Boolean maybeEquatable = properties.getBoolean("equatable");
   boolean equatable =  maybeEquatable == null ? defaults.equatable : maybeEquatable;

   Boolean maybeOmit = properties.getBoolean("omit");
   boolean omit = maybeOmit == null ? defaults.omit : maybeOmit;

   return new SwiftProperties(optionality, equatable, omit);
  }
 }
}
com.linkedin.pegasus.generator.specClassTemplateSpecgetOriginalTyperefSchema

Popular methods of ClassTemplateSpec

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

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getSystemService (Context)
  • putExtra (Intent)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JTable (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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