Codota Logo
Resources$ExInstWithCause
Code IndexAdd Codota to your IDE (free)

How to use
Resources$ExInstWithCause
in
org.apache.calcite.runtime

Best Java code snippets using org.apache.calcite.runtime.Resources$ExInstWithCause (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: Qihoo360/Quicksql

 public Exception call() throws Exception {
  return ex(new NullPointerException("test"));
 }
});
origin: org.apache.calcite/calcite-core

  getExceptionClass(method.getGenericReturnType());
Constructor<T> constructor;
final String str = str();
boolean causeInConstructor = false;
try {
origin: org.apache.calcite/calcite-core

 @Override public void validate(EnumSet<Validation> validations) {
  super.validate(validations);
  if (validations.contains(Validation.CREATE_EXCEPTION)) {
   validateException(
     new Callable<Exception>() {
      public Exception call() throws Exception {
       return ex();
      }
     });
  }
 }
}
origin: Qihoo360/Quicksql

 @Override public void validate(EnumSet<Validation> validations) {
  super.validate(validations);
  if (validations.contains(Validation.CREATE_EXCEPTION)) {
   validateException(
     new Callable<Exception>() {
      public Exception call() throws Exception {
       return ex();
      }
     });
  }
 }
}
origin: org.apache.calcite/calcite-core

 @Override public void validate(EnumSet<Validation> validations) {
  super.validate(validations);
  if (validations.contains(Validation.CREATE_EXCEPTION)) {
   validateException(
     new Callable<Exception>() {
      public Exception call() throws Exception {
       return ex(new NullPointerException("test"));
      }
     });
  }
 }
}
origin: org.apache.calcite/calcite-core

@Override public Inst localize(Locale locale) {
 return new ExInstWithCause<T>(base, locale, method, args);
}
origin: Qihoo360/Quicksql

 @Override public void validate(EnumSet<Validation> validations) {
  super.validate(validations);
  if (validations.contains(Validation.CREATE_EXCEPTION)) {
   validateException(
     new Callable<Exception>() {
      public Exception call() throws Exception {
       return ex(new NullPointerException("test"));
      }
     });
  }
 }
}
origin: Qihoo360/Quicksql

@Override public Inst localize(Locale locale) {
 return new ExInstWithCause<T>(base, locale, method, args);
}
origin: Qihoo360/Quicksql

/**
 * Wraps an exception with context.
 */
public static CalciteContextException newContextException(
  int line,
  int col,
  int endLine,
  int endCol,
  Resources.ExInst<?> e) {
 CalciteContextException contextExcn =
   (line == endLine && col == endCol
     ? RESOURCE.validatorContextPoint(line, col)
     : RESOURCE.validatorContext(line, col, endLine, endCol)).ex(e.ex());
 contextExcn.setPosition(line, col, endLine, endCol);
 return contextExcn;
}
origin: org.apache.calcite/calcite-core

/**
 * Wraps an exception with context.
 */
public static CalciteContextException newContextException(
  int line,
  int col,
  int endLine,
  int endCol,
  Resources.ExInst<?> e) {
 CalciteContextException contextExcn =
   (line == endLine && col == endCol
     ? RESOURCE.validatorContextPoint(line, col)
     : RESOURCE.validatorContext(line, col, endLine, endCol)).ex(e.ex());
 contextExcn.setPosition(line, col, endLine, endCol);
 return contextExcn;
}
origin: org.apache.calcite/calcite-core

/**
 * Implements the {@code .} (field access) operator on an object
 * whose type is not known until runtime.
 *
 * <p>A struct object can be represented in various ways by the
 * runtime and depends on the
 * {@link org.apache.calcite.adapter.enumerable.JavaRowFormat}.
 */
@Experimental
public static Object structAccess(Object structObject, int index, String fieldName) {
 if (structObject == null) {
  return null;
 }
 if (structObject instanceof Object[]) {
  return ((Object[]) structObject)[index];
 } else if (structObject instanceof List) {
  return ((List) structObject).get(index);
 } else if (structObject instanceof Row) {
  return ((Row) structObject).getObject(index);
 } else {
  Class<?> beanClass = structObject.getClass();
  try {
   Field structField = beanClass.getDeclaredField(fieldName);
   return structField.get(structObject);
  } catch (NoSuchFieldException | IllegalAccessException ex) {
   throw RESOURCE.failedToAccessField(fieldName, beanClass.getName()).ex(ex);
  }
 }
}
origin: dremio/dremio-oss

 @Override
 public void validateAggregateParams(SqlCall aggCall, SqlNode filter, SqlValidatorScope scope) {
  if (filter != null) {
   Exception e = new SqlValidatorException("Dremio does not currently support aggregate functions with a filter clause", null);
   SqlParserPos pos = filter.getParserPosition();
   CalciteContextException ex = RESOURCE.validatorContextPoint(pos.getLineNum(), pos.getColumnNum()).ex(e);
   ex.setPosition(pos.getLineNum(), pos.getColumnNum());
   throw ex;
  }
  super.validateAggregateParams(aggCall, filter, scope);
 }
}
origin: Qihoo360/Quicksql

  getExceptionClass(method.getGenericReturnType());
Constructor<T> constructor;
final String str = str();
boolean causeInConstructor = false;
try {
origin: org.apache.calcite/calcite-core

 public Exception call() throws Exception {
  return ex(new NullPointerException("test"));
 }
});
org.apache.calcite.runtimeResources$ExInstWithCause

Javadoc

Sub-class of Inst that can throw an exception. Requires caused by exception.

Most used methods

  • ex
  • <init>
  • getExceptionClass
  • str
  • validate
  • validateException

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Reference (javax.naming)
  • JLabel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now