Package org.springframework.core.io
Class DefaultResourceLoader.ClassPathContextResource
java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.core.io.AbstractFileResolvingResource
org.springframework.core.io.ClassPathResource
org.springframework.core.io.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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncreateRelative(String relativePath) This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor.Return the path within the enclosing 'context'.Methods inherited from class org.springframework.core.io.ClassPathResourceequals, exists, getClassLoader, getDescription, getFilename, getInputStream, getPath, getURL, hashCode, isReadable, resolveURLMethods inherited from class org.springframework.core.io.AbstractFileResolvingResourcecontentLength, customizeConnection, customizeConnection, getFile, getFile, getFileForLastModifiedCheck, isFile, isFile, lastModified, readableChannelMethods inherited from class org.springframework.core.io.AbstractResourcegetURI, isOpen, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.io.InputStreamSourcegetInputStreamMethods inherited from interface org.springframework.core.io.ResourcecontentLength, exists, getDescription, getFile, getFilename, getURI, getURL, isFile, isOpen, isReadable, lastModified, readableChannel
- 
Constructor Details- 
ClassPathContextResource
 
- 
- 
Method Details- 
getPathWithinContextDescription 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 interface- ContextResource
 
- 
createRelativeDescription 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 interface- Resource
- Overrides:
- createRelativein class- ClassPathResource
- Parameters:
- relativePath- the relative path (relative to this resource)
- Returns:
- the resource handle for the relative resource
- See Also:
 
 
-