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

public class OneConfigCollector extends ReflectiveCollector
Collects properties from an object using reflection, and from its inner classes. Ignores fields without an annotation with the Option annotation.
  • 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:
      collect in interface org.polyfrost.oneconfig.api.config.v1.collect.PropertyCollector
      Overrides:
      collect in class ReflectiveCollector
    • handleField

      protected void handleField(@NotNull @NotNull Field f, @NotNull @NotNull Object src, @NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree)
      Specified by:
      handleField in class ReflectiveCollector
    • handleMethod

      protected void handleMethod(@NotNull @NotNull Method m, @NotNull @NotNull Object src, @NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree builder)
      Specified by:
      handleMethod in class ReflectiveCollector
    • 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:
      handleInnerClass in class ReflectiveCollector
    • 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 a, Option opt, Field f)