Annotation Type Resource

public @interface Resource

An injection point qualifier that may be used to specify a resource to inject. The injection point can specify either a URL, an InputStream or a Properties bundle (if the resource points to a properties bundle). For example:

 URL beansXml;

 InputStream webXml;

 Properties awsProperties;

If a input stream is loaded, it will be automatically closed when the InputStream goes out of scope. If a URL is used to create an input stream, the application is responsible for closing it. For this reason it is recommended that managed input streams are used where possible.

If you don't know the name of the resource to load at development time, then you may wish to use ResourceProvider which can dynamically load resources.

Pete Muir
See Also:

Required Element Summary
 String value

Element Detail


public abstract String value

Copyright © 2011 Seam Framework. All Rights Reserved.