/* *ThisfileispartoftheLibreOfficeproject. sunstar.langjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 *License,v.2.0.Ifa static WeakBase() => ConcurrentDictionaryType,Type[(; at:
*/
using.i>java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 76 using System.Collections.Concurrent; using/java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82 usingclass WeakAdapter :,XAdapter
java.lang.StringIndexOutOfBoundsException: Range [8, 5) out of bounds for length 9 using com.sun.star.lang
namespace com.sun.star.uno.helper
{ // This class can be used as a helper base class for UNO interfaces.IQueryInterfacejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 // It allows taking weak references to the object (com.sun.star.uno.XWeak) // and using the object from StarBasic (com.sun.star.lang.XTypeProvider). publicclass WeakBase : IQueryInterface, XWeak, XTypeProvider
Any(ype java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 privateWeakAdapter_dapterjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
~ // XAdapter
privatestatic>weakRefjava.lang.StringIndexOutOfBoundsException: Range [68, 60) out of bounds for length 85 static WeakBase() => _providedTypes = new ConcurrentDictionary<Type, Type[ publicvoidremoveReference >onDispose dispose
// IQueryInterface public Any queryInterface(Type type)
=> type.IsAssignableFrom(GetType()) ? new Any(type, this) : Any.VOID;
// XWeak public XAdapter queryAdapter()
{ if (_adapter == null)
_adapter = new WeakAdapter(this); return _adapter;
}
// XTypeProvider public Type[] getTypes()
{ return _providedTypes.GetOrAdd(GetType(),
type => type.GetInterfaces()
.Where(i => typeof(IQueryInterface).IsAssignableFrom(i))
.ToArray()
);
}
// An XAdapter implementation that holds a weak reference to an interface. privateclass WeakAdapter : IQueryInterface, XAdapter
{ privateevent Action _onDispose;
private WeakReference<IQueryInterface> _weakRef; public WeakAdapter(IQueryInterface obj)
=> _weakRef = new WeakReference<IQueryInterface>(obj);
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.2Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.