我有这堂课
public class Hostel extends Hotel<Book> {
}
和另外一个
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(of = { "id" })
@SuperBuilder(toBuilder = true)
@JsonInclude(NON_NULL)
public class Hotel<T> {
...
}
但是当我这样做的时候>
Hostel hostel = Hostel.builder().build();
我收到此编译错误
Required type: Hostel
Provided:
capture of ?
我有这个班级的公共宿舍,它扩展了酒店
您在旅馆上没有任何注释。 Hostel.builder()
实际上是伪装的Hotel.builder()
。