Module com.rezzedup.util.constants
Package com.rezzedup.util.constants
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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Class<?>source()Provides the source class, from which constants are retrieved.default Stream<Constant<?>>streamAllConstants()Streams all constants from the source class.default Stream<Field>streamAllFields()Streams all the constant fields from the source class.default Stream<Constant<?>>streamPublicConstants()Streams accessiblepublicconstants from the source class.default Stream<Field>streamPublicFields()Streams accessiblepublicconstant fields from the 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 accessiblepublicconstant 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
-
-