Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

In the recorded signature files, I see some fields flagged with “hfds”. What does the “hfds” flag mean?

0
Posted

In the recorded signature files, I see some fields flagged with “hfds”. What does the “hfds” flag mean?

0

“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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123