Package org.springframework.security.access.hierarchicalroles

# Class RoleHierarchyImpl.Builder

java.lang.Object
org.springframework.security.access.hierarchicalroles.RoleHierarchyImpl.Builder

Enclosing class:
  RoleHierarchyImpl

public static final class RoleHierarchyImpl.Builder extends Object
Builder class for constructing a `RoleHierarchyImpl` based on a hierarchical role structure.

Since:
  6.3

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`final class`
`RoleHierarchyImpl.Builder.ImpliedRoles`
Builder class for constructing child roles within a role hierarchy branch.

## Method Summary

Modifier and Type
Method
Description
`RoleHierarchyImpl`
`build()`
Builds and returns a `RoleHierarchyImpl` describing the defined role hierarchy.
`RoleHierarchyImpl.Builder.ImpliedRoles`
`role(String role)`
Creates a new hierarchy branch to define a role and its child roles.

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

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

## Method Details

### role

public RoleHierarchyImpl.Builder.ImpliedRoles role(String role)
Creates a new hierarchy branch to define a role and its child roles.

Parameters:
  `role` - the highest role in this branch
Returns:
  a `RoleHierarchyImpl.Builder.ImpliedRoles` to define the child roles for the `role`

### build

public RoleHierarchyImpl build()
Builds and returns a `RoleHierarchyImpl` describing the defined role hierarchy.

Returns:
  a `RoleHierarchyImpl`