Java Code Examples for org.springframework.web.bind.annotation.PathVariable#required()

The following examples show how to use org.springframework.web.bind.annotation.PathVariable#required() . These examples are extracted from open source projects. 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
@Override
protected boolean isRequired(MethodParameter param, PathVariable annot) {
    // Spring disallows null for primitive types.
    // For types wrapped in Optional or nullable Kotlin types, the required flag in
    // the annotation is ignored by Spring.
    return param.getParameterType().isPrimitive() || (!param.isOptional() && annot.required());
}
 
Example 2
public PathVariableNamedValueInfo(PathVariable annotation) {
	super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE);
}
 
Example 3
public PathVariableNamedValueInfo(PathVariable annotation) {
	super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE);
}
 
Example 4
public PathVariableNamedValueInfo(PathVariable annotation) {
	super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE);
}
 
Example 5
public PathVariableNamedValueInfo(PathVariable annotation) {
	super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE);
}
 
Example 6
public PathVariableNamedValueInfo(PathVariable annotation) {
	super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE);
}