Tabnine Logo
Expressions.reference
Code IndexAdd Tabnine to your IDE (free)

How to use
reference
method
in
com.yahoo.aptutils.writer.expressions.Expressions

Best Java code snippets using com.yahoo.aptutils.writer.expressions.Expressions.reference (Showing top 2 results out of 315)

origin: yahoo/squidb

private void emitSinglePropertyDeclaration(PropertyGenerator generator, int index) throws IOException {
  modelSpec.getPluginBundle().beforeEmitPropertyDeclaration(writer, generator);
  DeclaredTypeName type = generator.getPropertyType();
  String fieldToQualify = ALIASED_PROPERTY_ARRAY_NAME + "[" + index + "]";
  Expression expressionToCast;
  if (modelSpec.getQueryElement() != null) {
    String callOn = modelSpec.getSpecAnnotation().isSubquery() ? SUBQUERY_NAME : VIEW_NAME;
    expressionToCast = Expressions.callMethodOn(callOn, "qualifyField", fieldToQualify);
  } else {
    expressionToCast = Expressions.reference(fieldToQualify);
  }
  writer.writeFieldDeclaration(type, generator.getPropertyName(),
      expressionToCast.cast(type), TypeConstants.PUBLIC_STATIC_FINAL)
      .writeNewline();
  modelSpec.getPluginBundle().afterEmitPropertyDeclaration(writer, generator);
}
origin: com.yahoo.squidb/squidb-processor

private void emitSinglePropertyDeclaration(PropertyGenerator generator, int index) throws IOException {
  modelSpec.getPluginBundle().beforeEmitPropertyDeclaration(writer, generator);
  DeclaredTypeName type = generator.getPropertyType();
  String fieldToQualify = ALIASED_PROPERTY_ARRAY_NAME + "[" + index + "]";
  Expression expressionToCast;
  if (modelSpec.getQueryElement() != null) {
    String callOn = modelSpec.getSpecAnnotation().isSubquery() ? SUBQUERY_NAME : VIEW_NAME;
    expressionToCast = Expressions.callMethodOn(callOn, "qualifyField", fieldToQualify);
  } else {
    expressionToCast = Expressions.reference(fieldToQualify);
  }
  writer.writeFieldDeclaration(type, generator.getPropertyName(),
      expressionToCast.cast(type), TypeConstants.PUBLIC_STATIC_FINAL)
      .writeNewline();
  modelSpec.getPluginBundle().afterEmitPropertyDeclaration(writer, generator);
}
com.yahoo.aptutils.writer.expressionsExpressionsreference

Popular methods of Expressions

  • classObject
  • staticMethod
  • arrayAllocation
  • arrayReference
  • assign
  • block
  • callConstructor
  • callMethod
  • callMethodOn
  • fromString
  • staticReference
  • staticReference

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (Timer)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JComboBox (javax.swing)
  • Top Sublime Text plugins
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