Class Constants


  • public class Constants
    extends Object
    Utilities for constant fields.
    • Method Detail

      • isConstant

        public static boolean isConstant​(@NullOr Field field)
        Checks whether a field is a static final constant.
        Parameters:
        field - the possible constant
        Returns:
        true if the field is static and final, otherwise false
      • 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