org.springframework.messaging.handler.annotation.ValueConstants Java Examples
The following examples show how to use
org.springframework.messaging.handler.annotation.ValueConstants.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractNamedValueMethodArgumentResolver.java From spring-analysis-note with MIT License | 5 votes |
/** * Fall back on the parameter name from the class file if necessary and * replace {@link ValueConstants#DEFAULT_NONE} with null. */ private NamedValueInfo updateNamedValueInfo(MethodParameter parameter, NamedValueInfo info) { String name = info.name; if (info.name.isEmpty()) { name = parameter.getParameterName(); if (name == null) { Class<?> type = parameter.getParameterType(); throw new IllegalArgumentException( "Name for argument of type [" + type.getName() + "] not specified, " + "and parameter name information not found in class file either."); } } return new NamedValueInfo(name, info.required, ValueConstants.DEFAULT_NONE.equals(info.defaultValue) ? null : info.defaultValue); }
Example #2
Source File: AbstractNamedValueMethodArgumentResolver.java From spring-analysis-note with MIT License | 5 votes |
/** * Fall back on the parameter name from the class file if necessary and * replace {@link ValueConstants#DEFAULT_NONE} with null. */ private NamedValueInfo updateNamedValueInfo(MethodParameter parameter, NamedValueInfo info) { String name = info.name; if (info.name.isEmpty()) { name = parameter.getParameterName(); if (name == null) { Class<?> type = parameter.getParameterType(); throw new IllegalArgumentException( "Name for argument of type [" + type.getName() + "] not specified, " + "and parameter name information not found in class file either."); } } return new NamedValueInfo(name, info.required, ValueConstants.DEFAULT_NONE.equals(info.defaultValue) ? null : info.defaultValue); }
Example #3
Source File: AbstractNamedValueMethodArgumentResolver.java From java-technology-stack with MIT License | 5 votes |
/** * Create a new NamedValueInfo based on the given NamedValueInfo with sanitized values. */ private NamedValueInfo updateNamedValueInfo(MethodParameter parameter, NamedValueInfo info) { String name = info.name; if (info.name.isEmpty()) { name = parameter.getParameterName(); if (name == null) { throw new IllegalArgumentException("Name for argument type [" + parameter.getParameterType().getName() + "] not available, and parameter name information not found in class file either."); } } String defaultValue = (ValueConstants.DEFAULT_NONE.equals(info.defaultValue) ? null : info.defaultValue); return new NamedValueInfo(name, info.required, defaultValue); }
Example #4
Source File: AbstractNamedValueMethodArgumentResolver.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * Create a new NamedValueInfo based on the given NamedValueInfo with sanitized values. */ private NamedValueInfo updateNamedValueInfo(MethodParameter parameter, NamedValueInfo info) { String name = info.name; if (info.name.length() == 0) { name = parameter.getParameterName(); if (name == null) { throw new IllegalArgumentException("Name for argument type [" + parameter.getParameterType().getName() + "] not available, and parameter name information not found in class file either."); } } String defaultValue = (ValueConstants.DEFAULT_NONE.equals(info.defaultValue) ? null : info.defaultValue); return new NamedValueInfo(name, info.required, defaultValue); }
Example #5
Source File: DestinationVariableMethodArgumentResolver.java From spring-analysis-note with MIT License | 4 votes |
private DestinationVariableNamedValueInfo(DestinationVariable annotation) { super(annotation.value(), true, ValueConstants.DEFAULT_NONE); }
Example #6
Source File: DestinationVariableMethodArgumentResolver.java From spring-analysis-note with MIT License | 4 votes |
private DestinationVariableNamedValueInfo(DestinationVariable annotation) { super(annotation.value(), true, ValueConstants.DEFAULT_NONE); }
Example #7
Source File: DestinationVariableMethodArgumentResolver.java From java-technology-stack with MIT License | 4 votes |
private DestinationVariableNamedValueInfo(DestinationVariable annotation) { super(annotation.value(), true, ValueConstants.DEFAULT_NONE); }
Example #8
Source File: DestinationVariableMethodArgumentResolver.java From spring4-understanding with Apache License 2.0 | 4 votes |
private DestinationVariableNamedValueInfo(DestinationVariable annotation) { super(annotation.value(), true, ValueConstants.DEFAULT_NONE); }