Class Deprecation
- java.lang.Object
-
- org.apache.sling.feature.extension.apiregions.api.Deprecation
-
public class Deprecation extends Object
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 Constructor Description Deprecation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMemberInfo(String member, DeprecationInfo i)Add deprecation info for a memberbooleanequals(Object obj)static StringgetClassMemberName(String member)Returns the class member name part of a member string.static StringgetClassName(String member)Returns the class name part of a member string.Map<String,DeprecationInfo>getMemberInfos()Get all deprecation member infosDeprecationInfogetPackageInfo()Get the optional package info if the package is deprecatedinthashCode()voidremoveMemberInfo(String member)Remove deprecation info for a membervoidsetPackageInfo(DeprecationInfo i)Set the deprecation info for the whole package
-
-
-
Method Detail
-
getPackageInfo
public DeprecationInfo getPackageInfo()
Get the optional package info if the package is deprecated- Returns:
- The info or
null
-
setPackageInfo
public void setPackageInfo(DeprecationInfo i)
Set the deprecation info for the whole package- Parameters:
i- The info- Throws:
IllegalStateException- If a member is already deprecated
-
addMemberInfo
public void addMemberInfo(String member, DeprecationInfo i)
Add deprecation info for a member- Parameters:
member- The memberi- The info- Throws:
IllegalStateException- if the package is already deprecated
-
removeMemberInfo
public void removeMemberInfo(String member)
Remove deprecation info for a member- Parameters:
member- The member
-
getMemberInfos
public Map<String,DeprecationInfo> getMemberInfos()
Get all deprecation member infos- Returns:
- The infos
-
getClassName
public static final String getClassName(String member)
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
public static final String getClassMemberName(String member)
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
-
-