package net.mattmccutchen.addins; import com.sun.star.lang.*; import com.sun.star.lib.uno.helper.*; public class ServiceBase extends WeakBase implements XServiceInfo, XServiceName { protected final SH sh; protected ServiceBase(SH sh) { this.sh = sh; } public String getImplementationName() { return sh.implementationName; } public String[] getSupportedServiceNames() { return sh.serviceNames.toArray(new String[sh.serviceNames.size()]); } public boolean supportsService(String svc) { return sh.serviceNames.contains(svc); } public String getServiceName() { return sh.mainServiceName(); } }