Package org.springframework.core.convert

Examples of org.springframework.core.convert.TypeDescriptor.asString()


      if (idx >= ctxString.length()) {
        throw new SpelEvaluationException(getStartPosition(),SpelMessage.STRING_INDEX_OUT_OF_BOUNDS, ctxString.length(), idx);
      }
      return new TypedValue(String.valueOf(ctxString.charAt(idx)));
    }
    throw new SpelEvaluationException(getStartPosition(),SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetObjectTypeDescriptor.asString());
  }


  @Override
  public boolean isWritable(ExpressionState expressionState) throws SpelEvaluationException {
View Full Code Here


                return accessor.read(eContext, targetObject, name);
              }
          }
        }
      } catch (AccessException e) {
        throw new SpelEvaluationException(getStartPosition(), e, SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetObjectTypeDescriptor.asString());
      }
    }
     
    throw new SpelEvaluationException(getStartPosition(),SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetObjectTypeDescriptor.asString());
  }
View Full Code Here

      } catch (AccessException e) {
        throw new SpelEvaluationException(getStartPosition(), e, SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetObjectTypeDescriptor.asString());
      }
    }
     
    throw new SpelEvaluationException(getStartPosition(),SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetObjectTypeDescriptor.asString());
  }
 
  @Override
  public boolean isWritable(ExpressionState expressionState) throws SpelEvaluationException {
    return true;
View Full Code Here

        Object possiblyConvertedValue = state.convertValue(newValue, targetObjectTypeDescriptor.getElementTypeDescriptor());
        list.set(idx,possiblyConvertedValue);
        return;
      }
      else {
        throw new SpelEvaluationException(getStartPosition(),SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetObjectTypeDescriptor.asString());
      }
    }
   
    // Try and treat the index value as a property of the context object   
    // TODO could call the conversion service to convert the value to a String   
View Full Code Here

            name, ae.getMessage());
      }

    }
   
    throw new SpelEvaluationException(getStartPosition(),SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetObjectTypeDescriptor.asString());
  }
 
  /**
   * Attempt to grow the specified collection so that the specified index is valid.
   *
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.