@groovy.transform.CompileStatic class Metadata extends io.micronaut.context.env.PropertySourcePropertyResolver
Represents the application Metadata and loading mechanics.
Modifiers | Name | Description |
---|---|---|
static class |
Metadata.FinalReference |
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
APPLICATION_GRAILS_VERSION |
|
static java.lang.String |
APPLICATION_NAME |
|
static java.lang.String |
APPLICATION_VERSION |
|
static java.lang.String |
BUILD_INFO_FILE |
|
static java.lang.String |
DEFAULT_APPLICATION_NAME |
|
static java.lang.String |
DEFAULT_SERVLET_VERSION |
|
static java.lang.String |
FILE |
|
static java.lang.String |
SERVLET_VERSION |
|
static java.lang.String |
WAR_DEPLOYED |
Type | Name and description |
---|---|
java.lang.String |
servletVersion |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
clear() |
|
boolean |
containsKey(java.lang.Object key) |
|
java.lang.Object |
get(java.lang.Object key) |
|
java.lang.String |
getApplicationName()
|
|
java.lang.String |
getApplicationVersion()
|
|
static Metadata |
getCurrent()
|
|
java.lang.String |
getEnvironment()
|
|
java.lang.String |
getGrailsVersion()
|
|
static Metadata |
getInstance(java.io.InputStream inputStream) Loads a Metadata instance from a Reader |
|
static Metadata |
getInstance(java.io.File file) Loads and returns a new Metadata object for the given File. |
|
static Metadata |
getInstance(org.springframework.core.io.Resource file) Loads and returns a new Metadata object for the given File. |
|
org.springframework.core.io.Resource |
getMetadataFile() |
|
java.lang.Object |
getOrDefault(java.lang.Object key, java.lang.Object defaultValue) |
<T> |
T |
getProperty(java.lang.String key, java.lang.Class<T> targetType, T defaultValue) |
|
java.lang.Object |
getProperty(java.lang.String propertyName) |
<T> |
T |
getRequiredProperty(java.lang.String key, java.lang.Class<T> targetType) |
|
java.lang.String |
getServletVersion()
|
|
boolean |
isDevelopmentEnvironmentAvailable()
|
|
boolean |
isWarDeployed()
|
|
java.lang.Object |
navigate(java.lang.String[] path) |
|
static Metadata |
reload() Reloads the application metadata. |
|
static void |
reset() Resets the current state of the Metadata so it is re-read. |
|
void |
setServletVersion(java.lang.String servletVersion) |
Methods inherited from class | Name |
---|---|
class io.micronaut.context.env.PropertySourcePropertyResolver |
io.micronaut.context.env.PropertySourcePropertyResolver#getAllProperties(io.micronaut.core.naming.conventions.StringConvention, io.micronaut.core.convert.format.MapFormat$MapTransformation), io.micronaut.context.env.PropertySourcePropertyResolver#containsProperty(java.lang.String), io.micronaut.context.env.PropertySourcePropertyResolver#containsProperties(java.lang.String), io.micronaut.context.env.PropertySourcePropertyResolver#addPropertySource(io.micronaut.context.env.PropertySource), io.micronaut.context.env.PropertySourcePropertyResolver#addPropertySource(java.lang.String, java.util.Map), io.micronaut.context.env.PropertySourcePropertyResolver#getPropertyEntries(java.lang.String), io.micronaut.context.env.PropertySourcePropertyResolver#getProperty(java.lang.String, io.micronaut.core.convert.ArgumentConversionContext), io.micronaut.context.env.PropertySourcePropertyResolver#getProperties(java.lang.String, io.micronaut.core.naming.conventions.StringConvention), io.micronaut.context.env.PropertySourcePropertyResolver#wait(long, int), io.micronaut.context.env.PropertySourcePropertyResolver#wait(long), io.micronaut.context.env.PropertySourcePropertyResolver#wait(), io.micronaut.context.env.PropertySourcePropertyResolver#equals(java.lang.Object), io.micronaut.context.env.PropertySourcePropertyResolver#toString(), io.micronaut.context.env.PropertySourcePropertyResolver#hashCode(), io.micronaut.context.env.PropertySourcePropertyResolver#getClass(), io.micronaut.context.env.PropertySourcePropertyResolver#notify(), io.micronaut.context.env.PropertySourcePropertyResolver#notifyAll(), io.micronaut.context.env.PropertySourcePropertyResolver#getRequiredProperty(java.lang.String, java.lang.Class), io.micronaut.context.env.PropertySourcePropertyResolver#get(java.lang.String, io.micronaut.core.convert.ArgumentConversionContext), io.micronaut.context.env.PropertySourcePropertyResolver#get(java.lang.CharSequence, io.micronaut.core.convert.ArgumentConversionContext), io.micronaut.context.env.PropertySourcePropertyResolver#getProperty(java.lang.String, java.lang.Class, io.micronaut.core.convert.ConversionContext), io.micronaut.context.env.PropertySourcePropertyResolver#getProperty(java.lang.String, io.micronaut.core.type.Argument), io.micronaut.context.env.PropertySourcePropertyResolver#getProperty(java.lang.String, java.lang.Class, java.lang.Object), io.micronaut.context.env.PropertySourcePropertyResolver#getProperty(java.lang.String, java.lang.Class), io.micronaut.context.env.PropertySourcePropertyResolver#getProperties(java.lang.String), io.micronaut.context.env.PropertySourcePropertyResolver#get(java.lang.CharSequence, java.lang.Class, java.lang.Object), io.micronaut.context.env.PropertySourcePropertyResolver#get(java.lang.CharSequence, io.micronaut.core.type.Argument), io.micronaut.context.env.PropertySourcePropertyResolver#get(java.lang.CharSequence, java.lang.Class) |
Loads a Metadata instance from a Reader
inputStream
- The InputStreamLoads and returns a new Metadata object for the given File.
file
- The FileLoads and returns a new Metadata object for the given File.
file
- The File
Reloads the application metadata.
Resets the current state of the Metadata so it is re-read.