|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.core.io.AbstractResource
org.springframework.beans.factory.support.BeanDefinitionResource
class BeanDefinitionResource
Descriptive Resource wrapper for
a BeanDefinition.
DescriptiveResource| Field Summary | |
|---|---|
private BeanDefinition |
beanDefinition
|
| Constructor Summary | |
|---|---|
BeanDefinitionResource(BeanDefinition beanDefinition)
Create a new BeanDefinitionResource. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
This implementation compares the underlying BeanDefinition. |
boolean |
exists()
This implementation checks whether a File can be opened, falling back to whether an InputStream can be opened. |
BeanDefinition |
getBeanDefinition()
Return the wrapped BeanDefinition object. |
java.lang.String |
getDescription()
Return a description for this resource, to be used for error output when working with the resource. |
java.io.InputStream |
getInputStream()
Return an InputStream. |
int |
hashCode()
This implementation returns the hash code of the underlying BeanDefinition. |
boolean |
isReadable()
This implementation always returns true. |
| Methods inherited from class org.springframework.core.io.AbstractResource |
|---|
contentLength, createRelative, getFile, getFileForLastModifiedCheck, getFilename, getURI, getURL, isOpen, lastModified, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final BeanDefinition beanDefinition
| Constructor Detail |
|---|
public BeanDefinitionResource(BeanDefinition beanDefinition)
beanDefinition - the BeanDefinition objectto wrap| Method Detail |
|---|
public final BeanDefinition getBeanDefinition()
public boolean exists()
AbstractResource
exists in interface Resourceexists in class AbstractResourcepublic boolean isReadable()
AbstractResourcetrue.
isReadable in interface ResourceisReadable in class AbstractResource
public java.io.InputStream getInputStream()
throws java.io.IOException
InputStreamSourceInputStream.
It is expected that each call creates a fresh stream.
This requirement is particularly important when you consider an API such
as JavaMail, which needs to be able to read the stream multiple times when
creating mail attachments. For such a use case, it is required
that each getInputStream() call returns a fresh stream.
java.io.IOException - if the stream could not be openedMimeMessageHelper.addAttachment(String, InputStreamSource)public java.lang.String getDescription()
ResourceImplementations are also encouraged to return this value
from their toString method.
Object.toString()public boolean equals(java.lang.Object obj)
equals in class AbstractResourceResource.getDescription()public int hashCode()
hashCode in class AbstractResourceResource.getDescription()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||