public abstract class AbstractApplicationAdapter extends Object implements ApplicationAdapter
Modifier and Type | Field and Description |
---|---|
protected Object |
adaptee |
protected String |
basePath |
protected ClassLoader |
classLoader |
protected ApplicationScope |
scope |
Constructor and Description |
---|
AbstractApplicationAdapter(Object adaptee)
Instantiates a new AbstractApplicationAdapter.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
getAdaptee()
Gets the adaptee object.
|
ApplicationScope |
getApplicationScope()
Gets the application scope.
|
String |
getBasePath()
Return the base path that the current application is mapped to.
|
ClassLoader |
getClassLoader()
Gets the class loader.
|
void |
setBasePath(String basePath)
Sets the application base path.
|
void |
setClassLoader(ClassLoader classLoader)
Sets the class loader.
|
String |
toRealPath(String filePath)
Returns to convert the given file path with the real file path.
|
File |
toRealPathAsFile(String filePath)
Returns to convert the given file path with the real file path.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttribute, getAttributeNames, removeAttribute, setAttribute
protected final Object adaptee
protected final ApplicationScope scope
protected ClassLoader classLoader
protected String basePath
public AbstractApplicationAdapter(Object adaptee)
adaptee
- the adaptee objectpublic <T> T getAdaptee()
ApplicationAdapter
getAdaptee
in interface ApplicationAdapter
T
- the generic typepublic ApplicationScope getApplicationScope()
ApplicationAdapter
getApplicationScope
in interface ApplicationAdapter
public ClassLoader getClassLoader()
ApplicationAdapter
getClassLoader
in interface ApplicationAdapter
public void setClassLoader(ClassLoader classLoader)
ApplicationAdapter
setClassLoader
in interface ApplicationAdapter
classLoader
- the class loaderpublic String getBasePath()
ApplicationAdapter
getBasePath
in interface ApplicationAdapter
public void setBasePath(String basePath)
basePath
- the new application base pathpublic String toRealPath(String filePath) throws IOException
ApplicationAdapter
toRealPath
in interface ApplicationAdapter
filePath
- the specified file pathIOException
- if an I/O error has occurredpublic File toRealPathAsFile(String filePath) throws IOException
ApplicationAdapter
toRealPathAsFile
in interface ApplicationAdapter
filePath
- the specified file pathIOException
- if an I/O error has occurredCopyright © 2008–2017 Aspectran.com. All rights reserved.