Class ParsingUtils

java.lang.Object
io.micrometer.docs.commons.ParsingUtils

public class ParsingUtils extends Object
  • Constructor Details

    • ParsingUtils

      public ParsingUtils()
  • Method Details

    • retrieveModelsFromEnum

      public static <T> List<T> retrieveModelsFromEnum(org.jboss.forge.roaster.model.source.JavaEnumSource enumSource, EntryEnumConstantReader<?> converter)
    • readStringReturnValue

      public static String readStringReturnValue(org.jboss.forge.roaster.model.source.MethodSource<?> methodSource)
      Read the return statement value as string. Currently, the string literal and boolean literal are supported.

      For example: String returnStringLiteral() { return "my-string"; } boolean returnBooleanPrimitive() { return true; } It resolves as "my-string" and "true" respectively.

      Parameters:
      methodSource - a method source which has the first line return statement with literal string or boolean.
      Returns:
      literal value as string
    • readEnumClassNames

      public static Set<String> readEnumClassNames(org.jboss.forge.roaster.model.source.MethodSource<?> methodSource)
    • expressionFromReturnMethodDeclaration

      @Nullable public static org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.Expression expressionFromReturnMethodDeclaration(org.jboss.forge.roaster.model.source.MethodSource<?> methodSource)
    • getMethodDeclaration

      public static org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.MethodDeclaration getMethodDeclaration(org.jboss.forge.roaster.model.source.MethodSource<?> methodSource)
      Retrieve MethodDeclaration from MethodSource.
      Parameters:
      methodSource - a method source
      Returns:
      retrieved method declaration