Interface Constants.ConstantStream

  • Enclosing class:
    Constants
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface Constants.ConstantStream
    Generates streams containing constants from a specific source class.
    • Method Detail

      • source

        Class<?> source()
        Provides the source class, from which constants are retrieved.
        Returns:
        the source class
      • streamAllFields

        default Stream<Field> streamAllFields()
        Streams all the constant fields from the source class.

        Note: fields in the stream may not necessarily be accessible.

        Returns:
        a stream containing all constant fields
        See Also:
        Constants.isConstant(Field)
      • streamPublicFields

        default Stream<Field> streamPublicFields()
        Streams accessible public constant fields from the source class.
        Returns:
        a stream containing public constant fields
        See Also:
        Constants.isConstant(Field)
      • streamAllConstants

        default Stream<Constant<?>> streamAllConstants()
        Streams all constants from the source class.
        Returns:
        a stream containing all constants
      • streamPublicConstants

        default Stream<Constant<?>> streamPublicConstants()
        Streams accessible public constants from the source class.
        Returns:
        a stream containing public constants