Package com.aspectran.core.adapter
Class AbstractApplicationAdapter
- java.lang.Object
-
- com.aspectran.core.adapter.AbstractApplicationAdapter
-
- All Implemented Interfaces:
ApplicationAdapter
- Direct Known Subclasses:
DefaultApplicationAdapter
public abstract class AbstractApplicationAdapter extends java.lang.Object implements ApplicationAdapter
The Class AbstractApplicationAdapter.- Since:
- 2011. 3. 13.
-
-
Constructor Summary
Constructors Constructor Description AbstractApplicationAdapter(java.lang.String basePath, java.lang.ClassLoader classLoader)
Instantiates a new AbstractApplicationAdapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
toRealPath(java.lang.String filePath)
Returns the real path of the existing file as a canonical pathname string.java.io.File
toRealPathAsFile(java.lang.String filePath)
Returns the real path of an existing file.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.aspectran.core.adapter.ApplicationAdapter
getAttribute, getAttributeNames, removeAttribute, setAttribute
-
-
-
-
Method Detail
-
getBasePath
public java.lang.String getBasePath()
Description copied from interface:ApplicationAdapter
Returns the base path that the current application is mapped to.- Specified by:
getBasePath
in interfaceApplicationAdapter
- Returns:
- the base path for this application
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Description copied from interface:ApplicationAdapter
Returns the class loader used by the current application.- Specified by:
getClassLoader
in interfaceApplicationAdapter
- Returns:
- the class loader
-
toRealPath
public java.lang.String toRealPath(java.lang.String filePath) throws java.io.IOException
Description copied from interface:ApplicationAdapter
Returns the real path of the existing file as a canonical pathname string.- Specified by:
toRealPath
in interfaceApplicationAdapter
- Parameters:
filePath
- the relative path or classpath of the file to find- Returns:
- the canonical pathname string of the found file
- Throws:
java.io.IOException
- If there is no file corresponding to the classpath, an exception is thrown, and if it is not the classpath, no exception is thrown because theFile
instance is returned regardless of the existence of the file.
-
toRealPathAsFile
public java.io.File toRealPathAsFile(java.lang.String filePath) throws java.io.IOException
Description copied from interface:ApplicationAdapter
Returns the real path of an existing file.- Specified by:
toRealPathAsFile
in interfaceApplicationAdapter
- Parameters:
filePath
- the relative path or classpath of the file to find- Returns:
- the real path of the found file
- Throws:
java.io.IOException
- If there is no file corresponding to the classpath, an exception is thrown, and if it is not the classpath, no exception is thrown because theFile
instance is returned regardless of the existence of the file.
-
-