Package alluxio.conf
Class DeprecatedKeyChecker
- java.lang.Object
-
- alluxio.conf.DeprecatedKeyChecker
-
public class DeprecatedKeyChecker extends java.lang.Object
This annotation checker should be used to determine whether aPropertyKey
orPropertyKey.Template
has a given annotation. The class is mainly useful to check forDeprecated
annotations on property keys and return the associated message, if any.
-
-
Constructor Summary
Constructors Constructor Description DeprecatedKeyChecker()
Create a new instance ofDeprecatedKeyChecker
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Deprecated
getAnnotation(PropertyKey key)
Returns the annotation attached to the given property key.boolean
hasAnnotation(PropertyKey key)
Returns whether or not the given property key is marked by this class' annotation.
-
-
-
Constructor Detail
-
DeprecatedKeyChecker
public DeprecatedKeyChecker()
Create a new instance ofDeprecatedKeyChecker
.
-
-
Method Detail
-
hasAnnotation
public boolean hasAnnotation(PropertyKey key)
Returns whether or not the given property key is marked by this class' annotation. It first checks if the specific key has the annotation, otherwise it will fall back to checking if the key's name matches any of the PropertyKey templates. If no keys or templates match, it will return false. This will only return true when the key is marked with aDeprecated
annotation.- Parameters:
key
- the property key to check- Returns:
- if this property key is deprecated
- See Also:
Deprecated
,PropertyKey.getDeprecationMessage(PropertyKey)
-
getAnnotation
@Nullable public Deprecated getAnnotation(PropertyKey key)
Returns the annotation attached to the given property key.- Parameters:
key
- the key to get the annotation for- Returns:
- the annotation if it exists, null otherwise
-
-