Package org.springframework.web.method

# Class HandlerTypePredicate.Builder

java.lang.Object
org.springframework.web.method.HandlerTypePredicate.Builder

Enclosing class:
  HandlerTypePredicate

public static class HandlerTypePredicate.Builder extends Object
A `HandlerTypePredicate` builder.

## Constructor Summary

Constructors
Constructor
Description
`Builder()`

## Method Summary

Modifier and Type
Method
Description
`final HandlerTypePredicate.Builder`
`annotation(Class<? extends Annotation>... annotations)`
Match types that are annotated with one of the given annotations.
`HandlerTypePredicate.Builder`
`assignableType(Class<?>... types)`
Match handlers that are assignable to a given type.
`HandlerTypePredicate.Builder`
`basePackage(String... packages)`
Match handlers declared under a base package, for example, "org.example".
`HandlerTypePredicate.Builder`
`basePackageClass(Class<?>... packageClasses)`
Type-safe alternative to `HandlerTypePredicate.forBasePackage(String...)` to specify a base package through a class.
`HandlerTypePredicate`
`build()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Builder

public Builder()

## Method Details

### basePackage

public HandlerTypePredicate.Builder basePackage(String... packages)
Match handlers declared under a base package, for example, "org.example".

Parameters:
  `packages` - one or more base package classes

### basePackageClass

public HandlerTypePredicate.Builder basePackageClass(Class<?>... packageClasses)
Type-safe alternative to `HandlerTypePredicate.forBasePackage(String...)` to specify a base package through a class.

Parameters:
  `packageClasses` - one or more base package names

### assignableType

public HandlerTypePredicate.Builder assignableType(Class<?>... types)
Match handlers that are assignable to a given type.

Parameters:
  `types` - one or more handler supertypes

### annotation

public final HandlerTypePredicate.Builder annotation(Class<? extends Annotation>... annotations)
Match types that are annotated with one of the given annotations.

Parameters:
  `annotations` - one or more annotations to check for

### build

public HandlerTypePredicate build()