org.jboss.webbeans.context
Class ContextualInstance<T>

java.lang.Object
  extended by org.jboss.webbeans.context.ContextualInstance<T>

public class ContextualInstance<T>
extends java.lang.Object

A representation of a contextual bean plus associated instance

Author:
Pete Muir

Constructor Summary
protected ContextualInstance(Contextual<T> contextual, T instance)
          Protected constructor
 
Method Summary
 void destroy()
          Destroys the instance by passing it to the destroy method of the contextual item
static
<T> ContextualInstance<T>
of(Contextual<T> contextual, T instance)
          Static constructor wrapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextualInstance

protected ContextualInstance(Contextual<T> contextual,
                             T instance)
Protected constructor

Parameters:
contextual - The contextual item
instance - The instance
Method Detail

of

public static <T> ContextualInstance<T> of(Contextual<T> contextual,
                                           T instance)
Static constructor wrapper

Type Parameters:
T - The type of the contextual item
Parameters:
contextual - The contextual item
instance - The instance
Returns:
A new ContextualInstance from the given parameters

destroy

public void destroy()
Destroys the instance by passing it to the destroy method of the contextual item



Copyright © 2011. All Rights Reserved.