Class AbstractSearchingFileVisitor

java.lang.Object
java.nio.file.SimpleFileVisitor<Path>
io.micrometer.docs.commons.AbstractSearchingFileVisitor
All Implemented Interfaces:
FileVisitor<Path>

public abstract class AbstractSearchingFileVisitor extends SimpleFileVisitor<Path>
Shared logic to process documentation enum classes.
  • Field Details

  • Constructor Details

  • Method Details

    • visitFile

      public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException
      Specified by:
      visitFile in interface FileVisitor<Path>
      Overrides:
      visitFile in class SimpleFileVisitor<Path>
      Throws:
      IOException
    • supportedInterfaces

      public abstract Collection<Class<?>> supportedInterfaces()
    • onEnumConstant

      public abstract void onEnumConstant(org.jboss.forge.roaster.model.source.JavaEnumSource enclosingEnumSource, org.jboss.forge.roaster.model.source.EnumConstantSource enumConstant)
    • validateNameOrConvention

      protected void validateNameOrConvention(String name, @Nullable String conventionClassName, org.jboss.forge.roaster.model.source.JavaEnumSource enclosingEnum)
    • retrieveEnumValues

      protected <T> List<T> retrieveEnumValues(org.jboss.forge.roaster.model.source.JavaSource<?> enclosingJavaSource, org.jboss.forge.roaster.model.source.MethodSource<?> methodSource, EntryEnumConstantReader<?> converter)
    • validatePrefixOnTags

      protected List<String> validatePrefixOnTags(String prefix, List<KeyNameEntry> tags, String enumName, String enclosingClassName)
      Check given tags start with the given prefix.
      Parameters:
      prefix - tag name prefix
      tags - tags
      enumName - the enum constant
      enclosingClassName - the enclosing enum class name
      Returns:
      list of invalid tag messages