Make Builders sensitive to @Deprecated annotations
When we are generating a builder for a deprecated type, we need to
consider how it deals with deprecated elements.
There are two scenarios here:
1) status=deprecated -> @Deprecated
In this case it is fair game to produce data, hence the builder
is not deprecated and therefore has @SuppressWarnings("deprecation")
2) status=obsolete -> @Deprecated(forRemoval = true)
In this case the data should not be produced at all, hence
the builder needs to be @Deprecated(forRemoval), too.
We recognize both these conditions and act accordingly. We misue
bug-586 test case to hijack compilation testing.
JIRA: MDSAL-485
Change-Id: I9d08116615cf8c5bdb6a8f4977c9810686618cda
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
e4ccdeadb4ffddae62860f8d080cb2a391a02f1f)