public void setQuery(CharSequence query) { this.query = query; this.message = new MessageImpl( QueryParserMessages.INVALID_SYNTAX_CANNOT_PARSE, query, ""); }
@Override public String toString() { Object[] args = getArguments(); StringBuilder sb = new StringBuilder(getKey()); if (args != null) { for (int i = 0; i < args.length; i++) { sb.append(i == 0 ? " " : ", ").append(args[i]); } } return sb.toString(); }
@Override public String getLocalizedMessage() { return getLocalizedMessage(Locale.getDefault()); }
/** * The following constructors are for use by you for whatever * purpose you can think of. Constructing the exception in this * manner makes the exception behave in the normal way - i.e., as * documented in the class "Throwable". The fields "errorToken", * "expectedTokenSequences", and "tokenImage" do not contain * relevant information. The JavaCC generated code does not use * these constructors. */ public ParseException() { super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, "Error")); }
@Override public String toString() { Object[] args = getArguments(); StringBuilder sb = new StringBuilder(getKey()); if (args != null) { for (int i = 0; i < args.length; i++) { sb.append(i == 0 ? " " : ", ").append(args[i]); } } return sb.toString(); }
@Override public String getLocalizedMessage() { return getLocalizedMessage(Locale.getDefault()); }
public void setQuery(CharSequence query) { this.query = query; this.message = new MessageImpl( QueryParserMessages.INVALID_SYNTAX_CANNOT_PARSE, query, ""); }
@Override public String getLocalizedMessage(Locale locale) { return NLS.getLocalizedMessage(getKey(), locale, getArguments()); }
/** * The following constructors are for use by you for whatever purpose you can think of. Constructing the exception in this manner makes the exception behave * in the normal way - i.e., as documented in the class "Throwable". The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain * relevant information. The JavaCC generated code does not use these constructors. */ public ParseException() { super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, "Error")); }
@Override public String getLocalizedMessage(Locale locale) { return NLS.getLocalizedMessage(getKey(), locale, getArguments()); }
/** * The following constructors are for use by you for whatever * purpose you can think of. Constructing the exception in this * manner makes the exception behave in the normal way - i.e., as * documented in the class "Throwable". The fields "errorToken", * "expectedTokenSequences", and "tokenImage" do not contain * relevant information. The JavaCC generated code does not use * these constructors. */ public ParseException() { super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, "Error")); }
public ParseException(final String message) { super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, message)); }
public ParseException(final String message, final Throwable throwable) { super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, message), throwable); }
public ParseException(final String message, final Throwable throwable) { super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, message), throwable); }
public ParseException(final String message) { super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, message)); }
/** Returns the numeric value of the hexadecimal character */ private static final int hexToInt(char c) throws ParseException { if ('0' <= c && c <= '9') { return c - '0'; } else if ('a' <= c && c <= 'f') { return c - 'a' + 10; } else if ('A' <= c && c <= 'F') { return c - 'A' + 10; } else { throw new ParseException(new MessageImpl(QueryParserMessages.INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE, c)); } }
/** Returns the numeric value of the hexadecimal character */ private static final int hexToInt(char c) throws ParseException { if ('0' <= c && c <= '9') { return c - '0'; } else if ('a' <= c && c <= 'f') { return c - 'a' + 10; } else if ('A' <= c && c <= 'F') { return c - 'A' + 10; } else { throw new ParseException(new MessageImpl( QueryParserMessages.INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE, c)); } }
/** Returns the numeric value of the hexadecimal character */ private static final int hexToInt(char c) throws ParseException { if ('0' <= c && c <= '9') { return c - '0'; } else if ('a' <= c && c <= 'f') { return c - 'a' + 10; } else if ('A' <= c && c <= 'F') { return c - 'A' + 10; } else { throw new ParseException(new MessageImpl( QueryParserMessages.INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE, c)); } }
private static NumericType getNumericDataType(Number number) throws QueryNodeException { if (number instanceof Long) { return NumericType.LONG; } else if (number instanceof Integer) { return NumericType.INT; } else if (number instanceof Double) { return NumericType.DOUBLE; } else if (number instanceof Float) { return NumericType.FLOAT; } else { throw new QueryNodeException( new MessageImpl( QueryParserMessages.NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY, number.getClass())); } }
private static NumericType getNumericDataType(Number number) throws QueryNodeException { if (number instanceof Long) { return NumericType.LONG; } else if (number instanceof Integer) { return NumericType.INT; } else if (number instanceof Double) { return NumericType.DOUBLE; } else if (number instanceof Float) { return NumericType.FLOAT; } else { throw new QueryNodeException( new MessageImpl( QueryParserMessages.NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY, number.getClass())); } }