Class DefaultResourceLoader.ClassPathContextResource
- java.lang.Object
-
- org.hotswap.agent.util.spring.io.resource.AbstractResource
-
- org.hotswap.agent.util.spring.io.resource.AbstractFileResolvingResource
-
- org.hotswap.agent.util.spring.io.resource.ClassPathResource
-
- org.hotswap.agent.util.spring.io.loader.DefaultResourceLoader.ClassPathContextResource
-
- All Implemented Interfaces:
ContextResource,InputStreamSource,Resource
- Enclosing class:
- DefaultResourceLoader
protected static class DefaultResourceLoader.ClassPathContextResource extends ClassPathResource implements ContextResource
ClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.
-
-
Constructor Summary
Constructors Constructor Description ClassPathContextResource(String path, ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourcecreateRelative(String relativePath)This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor.StringgetPathWithinContext()Return the path within the enclosing 'context'.-
Methods inherited from class org.hotswap.agent.util.spring.io.resource.ClassPathResource
equals, exists, getClassLoader, getDescription, getFilename, getInputStream, getPath, getURL, hashCode, resolveURL
-
Methods inherited from class org.hotswap.agent.util.spring.io.resource.AbstractFileResolvingResource
contentLength, customizeConnection, customizeConnection, getFile, getFile, getFileForLastModifiedCheck, isReadable, lastModified
-
Methods inherited from class org.hotswap.agent.util.spring.io.resource.AbstractResource
getURI, isOpen, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hotswap.agent.util.spring.io.resource.InputStreamSource
getInputStream
-
Methods inherited from interface org.hotswap.agent.util.spring.io.resource.Resource
contentLength, exists, getDescription, getFile, getFilename, getURI, getURL, isOpen, isReadable, lastModified
-
-
-
-
Constructor Detail
-
ClassPathContextResource
public ClassPathContextResource(String path, ClassLoader classLoader)
-
-
Method Detail
-
getPathWithinContext
public String getPathWithinContext()
Description copied from interface:ContextResourceReturn the path within the enclosing 'context'.This is typically path relative to a context-specific root directory, e.g. a ServletContext root or a PortletContext root.
- Specified by:
getPathWithinContextin interfaceContextResource
-
createRelative
public Resource createRelative(String relativePath)
Description copied from class:ClassPathResourceThis implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor.- Specified by:
createRelativein interfaceResource- Overrides:
createRelativein classClassPathResource- Parameters:
relativePath- the relative path (relative to this resource)- Returns:
- the resource handle for the relative resource
- See Also:
org.springframework.util.StringUtils#applyRelativePath(String, String)
-
-