Package io.micronaut.aot.core.config
Class MetadataUtils
java.lang.Object
io.micronaut.aot.core.config.MetadataUtils
Runtime reflection utils for analyzing AOT modules.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindMetadata
(Class<?> clazz) Returns the AOT module annotation for a class, if present.static Option
findOption
(Class<?> clazz, String name) Returns the option with the corresponding name.static boolean
isEnabledOn
(Runtime runtime, AOTCodeGenerator module) static boolean
isEnabledOn
(Runtime runtime, AOTModule module) static String
toPropertiesSample
(Option option) Returns a string representation of the option, for use in properties files.
-
Constructor Details
-
MetadataUtils
public MetadataUtils()
-
-
Method Details
-
findMetadata
Returns the AOT module annotation for a class, if present.- Parameters:
clazz
- the class to look for- Returns:
- the module annotation.
-
findOption
Returns the option with the corresponding name. If the supplied class is not annotated withAOTModule
invocation will fail.- Parameters:
clazz
- the AOT module classname
- the name of the option- Returns:
- the corresponding option
-
toPropertiesSample
Returns a string representation of the option, for use in properties files.- Parameters:
option
- the option to convert to sample text.- Returns:
- a sample
-
isEnabledOn
-
isEnabledOn
-