-
- Type Parameters:
T- constant type
public interface Constant<T>Represents a constant value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisFromCollection()Gets whether this constant was retrieved from a constant collection.Stringname()Gets the name of this constant.Class<?>source()Gets the source class from which this constant originates.Tvalue()Gets the non-null value of this constant.
-
-
-
Method Detail
-
source
Class<?> source()
Gets the source class from which this constant originates.- Returns:
- the source class
-
name
String name()
Gets the name of this constant.- Returns:
- the constant's name
-
value
T value()
Gets the non-null value of this constant.- Returns:
- the constant's value
-
isFromCollection
boolean isFromCollection()
Gets whether this constant was retrieved from a constant collection.- Returns:
trueif this constant is from a collection, otherwisefalse
-
-