Assigning role to a user through java SDK

Is there a way to create Role instance in java SDK to assign it to a user? It seems that there is no RoleBuilder or any other implementation that could be used in order to provide an argument to user.assignRole(Role role)