public class ConstantContainerBuilder extends Object
Containers from public static constants in a specified class.ContainerConstant| 限定符和类型 | 方法和说明 |
|---|---|
ConstantContainerBuilder |
annotationFinder(@NonNull AnnotationFinder annotationFinder)
Sets the annotation finder to use when reading annotations.
|
Container<Object> |
build()
Builds and returns an immutable container from the specified constant class and builder configuration.
|
ConstantContainerBuilder |
namespace(String namespace)
Sets the namespace of the container.
|
static ConstantContainerBuilder |
of(@NonNull Class<?> constantClass)
Returns a new builder for the specified constant class.
|
ConstantContainerBuilder |
onlyExplicitlyIncluded(boolean onlyExplicitlyIncluded)
Sets whether to include only constants that are explicitly annotated with
ContainerConstant.Include. |
ConstantContainerBuilder |
onlyPublic(boolean onlyPublic)
Sets whether to include only public constants.
|
ConstantContainerBuilder |
reverse(boolean reverse)
Sets whether to reverse the order of the constant values in the container.
|
public static ConstantContainerBuilder of(@NonNull Class<?> constantClass)
constantClass - the class containing the public static constantspublic ConstantContainerBuilder annotationFinder(@NonNull AnnotationFinder annotationFinder)
annotationFinder - the annotation finder to usepublic ConstantContainerBuilder onlyPublic(boolean onlyPublic)
onlyPublic - whether to include only public constantspublic ConstantContainerBuilder onlyExplicitlyIncluded(boolean onlyExplicitlyIncluded)
ContainerConstant.Include.onlyExplicitlyIncluded - whether to include only explicitly included constantspublic ConstantContainerBuilder reverse(boolean reverse)
reverse - whether to reverse the order of the constant valuespublic ConstantContainerBuilder namespace(String namespace)
namespace - the namespaceCopyright © 2024. All rights reserved.