Package io.micrometer.docs.commons
Class ParsingUtils
java.lang.Object
io.micrometer.docs.commons.ParsingUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.Expression
expressionFromReturnMethodDeclaration
(org.jboss.forge.roaster.model.source.MethodSource<?> methodSource) static org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.MethodDeclaration
getMethodDeclaration
(org.jboss.forge.roaster.model.source.MethodSource<?> methodSource) RetrieveMethodDeclaration
fromMethodSource
.readEnumClassNames
(org.jboss.forge.roaster.model.source.MethodSource<?> methodSource) static String
readStringReturnValue
(org.jboss.forge.roaster.model.source.MethodSource<?> methodSource) Read the return statement value as string.static <T> List<T>
retrieveModelsFromEnum
(org.jboss.forge.roaster.model.source.JavaEnumSource enumSource, EntryEnumConstantReader<?> converter)
-
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
-
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) RetrieveMethodDeclaration
fromMethodSource
.- Parameters:
methodSource
- a method source- Returns:
- retrieved method declaration
-