In the recorded signature files, I see some fields flagged with “hfds”. What does the “hfds” flag mean?
“hfds” is a list of names of non-API (with private and default access) fields and static inner classes. This is an internal implementation and SignatureTest tool does not track them. This flag is required due to member hiding. Any non-API field or class can hide an API element from a superclass with the same name. The following example demonstrates this. // this is an API class public class super { public final static double PI = 3.14d; // this is an API field } public class sub extends super { private String PI=”Pi… pi… pi…”; // this PI hides superclass’ API PI } Adding a non-API field can break compatibility — but only obliquely. The example above demonstrates this. Assume the existing client contains the code: System.out.println(“PI=” + sub.PI ); adding the private sub.PI breaks binary and source code compatibility in this case. SignatureTest tool builds a class hierarchy, calculates API hiding (like the JVM does), and reports an error.