Class SimpleResourceReference<T>
java.lang.Object
org.jboss.weld.injection.spi.helpers.SimpleResourceReference<T>
- Type Parameters:
T- the type of the instance
- All Implemented Interfaces:
Serializable,ResourceReference<T>
public class SimpleResourceReference<T>
extends Object
implements ResourceReference<T>, Serializable
A trivial holder that holds a resource reference and does not handle releasing.
The holder is serializable as long as the held instance is serializable.
- Author:
- Jozef Hartinger
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleResourceReference(T instance) Construct an instance from provided instance -
Method Summary
Modifier and TypeMethodDescriptionGet the instance of the resourcevoidrelease()Release the resource instance
-
Constructor Details
-
SimpleResourceReference
Construct an instance from provided instance- Parameters:
instance- resource reference
-
-
Method Details
-
getInstance
Description copied from interface:ResourceReferenceGet the instance of the resource- Specified by:
getInstancein interfaceResourceReference<T>- Returns:
- instance
-
release
public void release()Description copied from interface:ResourceReferenceRelease the resource instance- Specified by:
releasein interfaceResourceReference<T>
-