Class JDKDeprecationExtension
java.lang.Object
org.apache.sling.feature.extension.apiregions.api.JDKDeprecationExtension
Extension to hold information about deprecated JDK API
This class is not thread safe.
- Since:
- 1.1.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMemberInfo(String member, DeprecationInfo i) Add deprecation info for a memberbooleanstatic JDKDeprecationExtensiongetExtension(org.apache.sling.feature.Extension ext) Get the execution environment from the extension.static JDKDeprecationExtensiongetExtension(org.apache.sling.feature.Feature feature) Get the extension from the feature - if it exists.Get all deprecation member infosinthashCode()voidremoveMemberInfo(String member) Remove deprecation info for a memberjakarta.json.JsonObjecttoJSON()Generate a JSON representation
-
Field Details
-
EXTENSION_NAME
Extension name containing the deprecation. The extension can be used to specify JDK API which is deprecated / should not be used. This extension is of typeExtensionType.JSONand is optional.- See Also:
-
-
Method Details
-
getExtension
Get the extension from the feature - if it exists.- Parameters:
feature- The feature- Returns:
- The extension or
null. - Throws:
IllegalArgumentException- If the extension is wrongly formatted
-
getExtension
Get the execution environment from the extension.- Parameters:
ext- The extension- Returns:
- The execution environment or
null. - Throws:
IllegalArgumentException- If the extension is wrongly formatted
-
addMemberInfo
Add deprecation info for a member- Parameters:
member- The memberi- The info- Throws:
IllegalStateException- if the package is already deprecated
-
removeMemberInfo
Remove deprecation info for a member- Parameters:
member- The member
-
getMemberInfos
Get all deprecation member infos- Returns:
- The infos
-
toJSON
public jakarta.json.JsonObject toJSON()Generate a JSON representation- Returns:
- The JSON Object
-
hashCode
public int hashCode() -
equals
-