AbstractEnvironment, ContextEnvironmentpublic interface Environment
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
acceptsProfiles(java.lang.String... profiles) |
Return whether one or more of the given profiles is active or, in the case of no
explicit active profiles, whether one or more of the given profiles is included in
the set of default profiles.
|
java.lang.String[] |
getActiveProfiles() |
Returns the set of profiles explicitly made active for this environment.
|
java.lang.String |
getBasePath() |
Returns the base path that the current application is mapped to.
|
java.lang.ClassLoader |
getClassLoader() |
Returns the class loader used by the current application.
|
java.lang.String[] |
getDefaultProfiles() |
Returns the set of profiles to be active by default when no active profiles have
been set explicitly.
|
<T> T |
getProperty(java.lang.String name,
Activity activity) |
|
void |
setClassLoader(java.lang.ClassLoader classLoader) |
Specifies the class loader used by the current application.
|
java.lang.String |
toRealPath(java.lang.String filePath) |
Returns to convert the given file path with the real file path.
|
java.io.File |
toRealPathAsFile(java.lang.String filePath) |
Returns to convert the given file path with the real file path.
|
java.lang.String[] getActiveProfiles()
java.lang.String[] getDefaultProfiles()
boolean acceptsProfiles(java.lang.String... profiles)
env.acceptsProfiles("p1", "!p2") will
return true if profile 'p1' is active or 'p2' is not active.profiles - the given profilesjava.lang.IllegalArgumentException - if called with zero arguments
or if any profile is null, empty or whitespace-onlygetActiveProfiles(),
getDefaultProfiles()<T> T getProperty(java.lang.String name,
Activity activity)
java.lang.ClassLoader getClassLoader()
void setClassLoader(java.lang.ClassLoader classLoader)
classLoader - the class loaderjava.lang.String getBasePath()
java.lang.String toRealPath(java.lang.String filePath)
throws java.io.IOException
filePath - the specified file pathjava.io.IOException - if an I/O error has occurredjava.io.File toRealPathAsFile(java.lang.String filePath)
throws java.io.IOException
filePath - the specified file pathjava.io.IOException - if an I/O error has occurredCopyright © 2008–2017 The Aspectran Project. All rights reserved.