Package org.springframework.expression.spel

Examples of org.springframework.expression.spel.SpelParseException


    }
    return tokenStream.get(tokenStreamPointer);
  }

  private void raiseInternalException(int pos, SpelMessage message,Object... inserts) {
    throw new InternalParseException(new SpelParseException(expressionString,pos,message,inserts));   
  }
View Full Code Here


        } else {
          terminated = true;
        }
      }
      if (ch==0) {
        throw new InternalParseException(new SpelParseException(expressionString,start,SpelMessage.NON_TERMINATING_QUOTED_STRING));
      }
    }
    pos++;
    tokens.add(new Token(TokenKind.LITERAL_STRING, subarray(start,pos), start, pos));
  }
View Full Code Here

      char ch = toProcess[pos];
      if (ch=='"') {
        terminated = true;
      }
      if (ch==0) {
        throw new InternalParseException(new SpelParseException(expressionString,start,SpelMessage.NON_TERMINATING_DOUBLE_QUOTED_STRING));
      }
    }
    pos++;
    tokens.add(new Token(TokenKind.LITERAL_STRING, subarray(start,pos), start, pos));
  }
View Full Code Here

    // Now there may or may not be an exponent
   
    // is it a long ?
    if (isChar('L','l')) {
      if (isReal) { // 3.4L - not allowed
        throw new InternalParseException(new SpelParseException(expressionString,start,SpelMessage.REAL_CANNOT_BE_LONG));
      }
      pushIntToken(subarray(start, endOfNumber), true, start, endOfNumber);
      pos++;
    } else if (isExponentChar(toProcess[pos])) {
      isReal = true; // if it wasnt before, it is now
View Full Code Here

  }

  private void pushHexIntToken(char[] data,boolean isLong, int start, int end) {
    if (data.length==0) {
      if (isLong) {       
        throw new InternalParseException(new SpelParseException(expressionString,start,SpelMessage.NOT_A_LONG,expressionString.substring(start,end+1)));
      } else {
        throw new InternalParseException(new SpelParseException(expressionString,start,SpelMessage.NOT_AN_INTEGER,expressionString.substring(start,end)));
      }
    }
    if (isLong) {
      tokens.add(new Token(TokenKind.LITERAL_HEXLONG, data, start, end));
    } else {
View Full Code Here

  public static Literal getIntLiteral(String numberToken, int pos, int radix) {
    try {
      int value = Integer.parseInt(numberToken, radix);
      return new IntLiteral(numberToken, pos, value);
    } catch (NumberFormatException nfe) {
      throw new InternalParseException(new SpelParseException(pos>>16, nfe, SpelMessage.NOT_AN_INTEGER, numberToken));
    }
  }
View Full Code Here

  public static Literal getLongLiteral(String numberToken, int pos, int radix) {
    try {
      long value = Long.parseLong(numberToken, radix);
      return new LongLiteral(numberToken, pos, value);
    } catch (NumberFormatException nfe) {
      throw new InternalParseException(new SpelParseException(pos>>16, nfe, SpelMessage.NOT_A_LONG, numberToken));
    }
  }
View Full Code Here

      } else {
        double value = Double.parseDouble(numberToken);
        return new RealLiteral(numberToken, pos, value);       
      }
    } catch (NumberFormatException nfe) {
      throw new InternalParseException(new SpelParseException(pos>>16, nfe, SpelMessage.NOT_A_REAL, numberToken));
    }
  }
View Full Code Here

        } else {
          terminated = true;
        }
      }
      if (ch==0) {
        throw new InternalParseException(new SpelParseException(expressionString,start,SpelMessage.NON_TERMINATING_QUOTED_STRING));
      }
    }
    pos++;
    tokens.add(new Token(TokenKind.LITERAL_STRING, subarray(start,pos), start, pos));
  }
View Full Code Here

      char ch = toProcess[pos];
      if (ch=='"') {
        terminated = true;
      }
      if (ch==0) {
        throw new InternalParseException(new SpelParseException(expressionString,start,SpelMessage.NON_TERMINATING_DOUBLE_QUOTED_STRING));
      }
    }
    pos++;
    tokens.add(new Token(TokenKind.LITERAL_STRING, subarray(start,pos), start, pos));
  }
View Full Code Here

TOP

Related Classes of org.springframework.expression.spel.SpelParseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.