JBoss Modular Service Kernel API 1.0.0.Beta1

org.jboss.msc.ref
Class StrongReference<T,A>

java.lang.Object
  extended by org.jboss.msc.ref.StrongReference<T,A>
All Implemented Interfaces:
Reference<T,A>

public class StrongReference<T,A>
extends Object
implements Reference<T,A>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.msc.ref.Reference
Reference.Type
 
Constructor Summary
StrongReference(T value)
           
StrongReference(T value, A attachment)
           
 
Method Summary
 void clear()
          Clear the reference.
 T get()
          Get the value, or null if the reference has been cleared.
 A getAttachment()
          Get the attachment, if any.
 Reference.Type getType()
          Get the type of the reference.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StrongReference

public StrongReference(T value,
                       A attachment)

StrongReference

public StrongReference(T value)
Method Detail

get

public T get()
Description copied from interface: Reference
Get the value, or null if the reference has been cleared.

Specified by:
get in interface Reference<T,A>
Returns:
the value

clear

public void clear()
Description copied from interface: Reference
Clear the reference.

Specified by:
clear in interface Reference<T,A>

getAttachment

public A getAttachment()
Description copied from interface: Reference
Get the attachment, if any.

Specified by:
getAttachment in interface Reference<T,A>
Returns:
the attachment

getType

public Reference.Type getType()
Description copied from interface: Reference
Get the type of the reference.

Specified by:
getType in interface Reference<T,A>
Returns:
the type

toString

public String toString()
Overrides:
toString in class Object

JBoss Modular Service Kernel API 1.0.0.Beta1

Copyright © 2010 JBoss, a division of Red Hat, Inc.