تخطَّ إلى المحتوى

File Name Matches Type (ARCH4005)

هذا المحتوى غير متوفر بلغتك بعد.

Key java.naming.file-name-matches-type · Severity info · Category naming

In Java a source file’s name should match its primary top-level type. When it doesn’t, navigation and reading the codebase become harder.

Account.java
public class OrderService { // does not match file name
void place() { }
}
OrderService.java
public class OrderService {
void place() { }
}

Rename the file to match its primary public type (minus the extension).