Class Deprecation
java.lang.Object
org.apache.sling.feature.extension.apiregions.api.Deprecation
Deprecation state for a package
Either the whole package is deprecated or some members.
This class is not thread safe.
- Since:
- 1.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMemberInfo(String member, DeprecationInfo i) Add deprecation info for a memberbooleanstatic final StringgetClassMemberName(String member) Returns the class member name part of a member string.static final StringgetClassName(String member) Returns the class name part of a member string.Get all deprecation member infosGet the optional package info if the package is deprecatedinthashCode()voidremoveMemberInfo(String member) Remove deprecation info for a membervoidSet the deprecation info for the whole package
-
Constructor Details
-
Deprecation
public Deprecation()
-
-
Method Details
-
getPackageInfo
Get the optional package info if the package is deprecated- Returns:
- The info or
null
-
setPackageInfo
Set the deprecation info for the whole package- Parameters:
i- The info- Throws:
IllegalStateException- If a member is already deprecated
-
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
-
getClassName
Returns the class name part of a member string. This is the part before the first hash (or the full string if no hash)- Parameters:
member- The member- Returns:
- The class name
-
getClassMemberName
Returns the class member name part of a member string. This is the part after the first hash (ornullif no hash- Parameters:
member- The member- Returns:
- The class member name or
null
-
hashCode
public int hashCode() -
equals
-