congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FactoryExpressionUtils.countArguments
Code IndexAdd Tabnine to your IDE (free)

How to use
countArguments
method
in
com.mysema.query.types.FactoryExpressionUtils

Best Java code snippets using com.mysema.query.types.FactoryExpressionUtils.countArguments (Showing top 2 results out of 315)

origin: com.mysema.querydsl/querydsl-core

private static int countArguments(FactoryExpression<?> expr) {
  int counter = 0;
  for (Expression<?> arg : expr.getArgs()) {
    if (arg instanceof ProjectionRole) {
      arg = ((ProjectionRole)arg).getProjection();
    }
    if (arg instanceof FactoryExpression<?>) {
      counter += countArguments((FactoryExpression<?>)arg);
    } else {
      counter++;
    }
  }
  return counter;
}
origin: com.mysema.querydsl/querydsl-core

private static Object[] compress(List<Expression<?>> exprs, Object[] args) {
  Object[] rv = new Object[exprs.size()];
  int offset = 0;
  for (int i = 0; i < exprs.size(); i++) {
    Expression<?> expr = exprs.get(i);
    if (expr instanceof ProjectionRole) {
      expr = ((ProjectionRole) expr).getProjection();
    }
    if (expr instanceof FactoryExpression<?>) {
      FactoryExpression<?> fe = (FactoryExpression<?>)expr;
      int fullArgsLength = countArguments(fe);
      Object[] compressed = compress(fe.getArgs(), ArrayUtils.subarray(args, offset, offset + fullArgsLength));
      rv[i] = fe.newInstance(compressed);
      offset += fullArgsLength;
    } else {
      rv[i] = args[offset];
      offset++;
    }
  }
  return rv;
}
com.mysema.query.typesFactoryExpressionUtilscountArguments

Popular methods of FactoryExpressionUtils

  • wrap
  • compress
  • expand

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
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