Package io.micrometer.docs.commons
Class AbstractSearchingFileVisitor
- All Implemented Interfaces:
FileVisitor<Path>
Shared logic to process documentation enum classes.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSearchingFileVisitor
(Pattern pattern, JavaSourceSearchHelper searchHelper) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
onEnumConstant
(org.jboss.forge.roaster.model.source.JavaEnumSource enclosingEnumSource, org.jboss.forge.roaster.model.source.EnumConstantSource enumConstant) protected <T> List<T>
retrieveEnumValues
(org.jboss.forge.roaster.model.source.JavaSource<?> enclosingJavaSource, org.jboss.forge.roaster.model.source.MethodSource<?> methodSource, EntryEnumConstantReader<?> converter) abstract Collection<Class<?>>
protected void
validateNameOrConvention
(String name, String conventionClassName, org.jboss.forge.roaster.model.source.JavaEnumSource enclosingEnum) validatePrefixOnTags
(String prefix, List<KeyNameEntry> tags, String enumName, String enclosingClassName) Check given tags start with the given prefix.visitFile
(Path path, BasicFileAttributes attrs) Methods inherited from class java.nio.file.SimpleFileVisitor
postVisitDirectory, preVisitDirectory, visitFileFailed
-
Field Details
-
pattern
-
searchHelper
-
-
Constructor Details
-
AbstractSearchingFileVisitor
-
-
Method Details
-
visitFile
- Specified by:
visitFile
in interfaceFileVisitor<Path>
- Overrides:
visitFile
in classSimpleFileVisitor<Path>
- Throws:
IOException
-
supportedInterfaces
-
onEnumConstant
public abstract void onEnumConstant(org.jboss.forge.roaster.model.source.JavaEnumSource enclosingEnumSource, org.jboss.forge.roaster.model.source.EnumConstantSource enumConstant) -
validateNameOrConvention
-
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 prefixtags
- tagsenumName
- the enum constantenclosingClassName
- the enclosing enum class name- Returns:
- list of invalid tag messages
-