Class OneConfigCollector
java.lang.Object
org.polyfrost.oneconfig.api.config.v1.collect.impl.ReflectiveCollector
org.polyfrost.oneconfig.api.config.v1.collect.impl.OneConfigCollector
- All Implemented Interfaces:
org.polyfrost.oneconfig.api.config.v1.collect.PropertyCollector
Collects properties from an object using reflection and from its inner classes
Ignores fields without an annotation with the
Ignores fields without an annotation with the
Option annotation-
Field Summary
Fields inherited from class org.polyfrost.oneconfig.api.config.v1.collect.impl.ReflectiveCollector
LOGGER, maxDepth -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable org.polyfrost.oneconfig.api.config.v1.Treeprotected voidhandleField(@NotNull Field f, @NotNull Object src, @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree) protected voidhandleInnerClass(@NotNull Class<?> c, @NotNull Object src, int depth, @NotNull org.polyfrost.oneconfig.api.config.v1.Tree builder) protected voidhandleMetadata(org.polyfrost.oneconfig.api.config.v1.Tree tree, @NotNull org.polyfrost.oneconfig.api.config.v1.Property<?> property, @NotNull Annotation annotation, Option option, Field field) protected voidhandleMethod(@NotNull Method m, @NotNull Object src, @NotNull org.polyfrost.oneconfig.api.config.v1.Tree builder) Methods inherited from class org.polyfrost.oneconfig.api.config.v1.collect.impl.ReflectiveCollector
handle
-
Constructor Details
-
OneConfigCollector
public OneConfigCollector()
-
-
Method Details
-
collect
@Nullable public @Nullable org.polyfrost.oneconfig.api.config.v1.Tree collect(@NotNull @NotNull Object src) - Specified by:
collectin interfaceorg.polyfrost.oneconfig.api.config.v1.collect.PropertyCollector- Overrides:
collectin classReflectiveCollector
-
handleField
protected void handleField(@NotNull @NotNull Field f, @NotNull @NotNull Object src, @NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree) - Specified by:
handleFieldin classReflectiveCollector
-
handleMethod
protected void handleMethod(@NotNull @NotNull Method m, @NotNull @NotNull Object src, @NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree builder) - Specified by:
handleMethodin classReflectiveCollector
-
handleInnerClass
protected void handleInnerClass(@NotNull @NotNull Class<?> c, @NotNull @NotNull Object src, int depth, @NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree builder) - Specified by:
handleInnerClassin classReflectiveCollector
-
handleMetadata
protected void handleMetadata(org.polyfrost.oneconfig.api.config.v1.Tree tree, @NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Property<?> property, @NotNull @NotNull Annotation annotation, Option option, Field field)
-