src/main/java/org/jboss/util/WeakObject.java
public static WeakObject create(final Object obj,
                                   final ReferenceQueue queue)
   {
      if (obj == null) return null;
      else return new WeakObject(obj, queue);
   }
public static WeakObject create(final Object obj,
                                   final ReferenceQueue queue)
   {
      if (obj == null) return null;
      else return new WeakObject(obj, queue);
   }
Create a <tt>WeakObject</tt> for the given object.

@param obj     Object to reference.
@param queue   Reference queue.
@return        <tt>WeakObject</tt> or <tt>null</tt> if object is null.