- java.lang.Object
-
- com.rezzedup.util.constants.Constants
-
public class Constants extends Object
Utilities for constant fields.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceConstants.ConstantStreamGenerates streams containing constants from a specific source class.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Constants.ConstantStreamin(Class<?> source)Get the constants contained within the provided class.static booleanisConstant(@NullOr Field field)Checks whether a field is astatic finalconstant.
-
-
-
Method Detail
-
isConstant
public static boolean isConstant(@NullOr Field field)
Checks whether a field is astatic finalconstant.- Parameters:
field- the possible constant- Returns:
trueif the field isstaticandfinal, otherwisefalse
-
in
public static Constants.ConstantStream in(Class<?> source)
Get the constants contained within the provided class.- Parameters:
source- the source class- Returns:
- an entrypoint for streaming the class's constants
-
-