Class ReflectiveCollector

java.lang.Object
org.polyfrost.oneconfig.api.config.v1.collect.impl.ReflectiveCollector
All Implemented Interfaces:
org.polyfrost.oneconfig.api.config.v1.collect.PropertyCollector
Direct Known Subclasses:
OneConfigCollector

public abstract class ReflectiveCollector extends Object implements org.polyfrost.oneconfig.api.config.v1.collect.PropertyCollector
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.apache.logging.log4j.Logger
     
    protected final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReflectiveCollector(int maxDepth)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.polyfrost.oneconfig.api.config.v1.Tree
    collect(@NotNull Object src)
     
    void
    handle(@NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree, @NotNull Object src, int depth)
     
    protected abstract void
    handleField(@NotNull Field f, @NotNull Object src, @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree)
     
    protected abstract void
    handleInnerClass(@NotNull Class<?> c, @NotNull Object src, int depth, @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree)
     
    protected abstract void
    handleMethod(@NotNull Method m, @NotNull Object src, @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOGGER

      protected static final org.apache.logging.log4j.Logger LOGGER
    • maxDepth

      protected final int maxDepth
  • Constructor Details

    • ReflectiveCollector

      public ReflectiveCollector(int maxDepth)
  • 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
    • handleField

      protected abstract void handleField(@NotNull @NotNull Field f, @NotNull @NotNull Object src, @NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree)
    • handleMethod

      protected abstract void handleMethod(@NotNull @NotNull Method m, @NotNull @NotNull Object src, @NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree)
    • handleInnerClass

      protected abstract void handleInnerClass(@NotNull @NotNull Class<?> c, @NotNull @NotNull Object src, int depth, @NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree)
    • handle

      public void handle(@NotNull @NotNull org.polyfrost.oneconfig.api.config.v1.Tree tree, @NotNull @NotNull Object src, int depth)