public MetaClass getWeakMetaClass() { // safe value here to avoid multiple reads with possibly // differing values due to concurrency ManagedReference<MetaClass> weakRef = weakMetaClass; return weakRef == null ? null : weakRef.get(); }
/** * Returns the value stored for the given key at the point of call. * @param key a non null key * @return the value stored in the map for the given key */ public V get(K key) { ManagedReference<V> ref = internalMap.get(key); if (ref!=null) return ref.get(); return null; }
public String toString() { T res = reference.get(); if (res == null) return "<null>"; else return res.toString(); } }
public T get() { ManagedReference<T> resRef = reference; if (resRef == INIT) return getLocked(false); if (resRef == NULL_REFERENCE) return null; T res = resRef.get(); // res== null means it got collected if (res==null) return getLocked(true); return res; }
private T getLocked (boolean force) { lock (); try { ManagedReference<T> resRef = reference; if (!force && resRef != INIT) return resRef.get(); T res = initValue(); if (res == null) { reference = NULL_REFERENCE; } else { reference = new ManagedReference<T>(bundle,res); } return res; } finally { unlock(); } }
/** * Returns the value stored for the given key at the point of call. * * @param key a non null key * @return the value stored in the map for the given key */ public V get(final K key) { final ManagedReference<V> ref = internalMap.get(key); if (ref != null) return ref.get(); return null; }
public MetaClass getWeakMetaClass() { return weakMetaClass == null ? null : weakMetaClass.get(); }
public MetaClass getWeakMetaClass() { return weakMetaClass == null ? null : weakMetaClass.get(); }
public MetaClass getWeakMetaClass() { return weakMetaClass == null ? null : weakMetaClass.get(); }
public MetaClass getMetaClassForClass() { return strongMetaClass != null ? strongMetaClass : weakMetaClass == null ? null : weakMetaClass.get(); }
public MetaClass getMetaClassForClass() { return strongMetaClass != null ? strongMetaClass : weakMetaClass == null ? null : weakMetaClass.get(); }
public String toString() { T res = reference.get(); if (res == null) return "<null>"; else return res.toString(); } }
/** * Returns the value stored for the given key at the point of call. * * @param key a non null key * @return the value stored in the map for the given key */ public V get(final K key) { final ManagedReference<V> ref = internalMap.get(key); if (ref != null) return ref.get(); return null; }
public String toString() { T res = reference.get(); if (res == null) return "<null>"; else return res.toString(); } }
public String toString() { T res = reference.get(); if (res == null) return "<null>"; else return res.toString(); } }
/** * Returns the value stored for the given key at the point of call. * * @param key a non null key * @return the value stored in the map for the given key */ public V get(final K key) { final ManagedReference<V> ref = internalMap.get(key); if (ref != null) return ref.get(); return null; }
/** * Returns the value stored for the given key at the point of call. * @param key a non null key * @return the value stored in the map for the given key */ public V get(K key) { ManagedReference<V> ref = internalMap.get(key); if (ref!=null) return ref.get(); return null; }
public T get() { ManagedReference<T> resRef = reference; if (resRef == INIT) return getLocked(false); if (resRef == NULL_REFERENCE) return null; T res = resRef.get(); // res== null means it got collected if (res==null) return getLocked(true); return res; }
public T get() { ManagedReference<T> resRef = reference; if (resRef == INIT) return getLocked(false); if (resRef == NULL_REFERENCE) return null; T res = resRef.get(); // res== null means it got collected if (res==null) return getLocked(true); return res; }
public T get() { ManagedReference<T> resRef = reference; if (resRef == INIT) return getLocked(false); if (resRef == NULL_REFERENCE) return null; T res = resRef.get(); // res== null means it got collected if (res==null) return getLocked(true); return res; }