Kaydet (Commit) 5dcfbe57 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clean up VendorBase (virtual) member functions

Change-Id: I1377dfded1246c8e96db3addc28489886c7f2d99
üst 454f5c30
......@@ -34,7 +34,6 @@ public:
static rtl::Reference<VendorBase> createInstance();
using VendorBase::getLibraryPaths;
virtual char const* const* getRuntimePaths(int * size) SAL_OVERRIDE;
virtual char const* const* getLibraryPaths(int* size) SAL_OVERRIDE;
virtual int compareVersions(const OUString& sSecond) const SAL_OVERRIDE;
......
......@@ -157,10 +157,10 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info)
pInfo->nRequirements = info->needsRestart() ? JFW_REQUIRE_NEEDRESTART : 0;
OUStringBuffer buf(1024);
buf.append(info->getRuntimeLibrary());
if (!info->getLibraryPaths().isEmpty())
if (!info->getLibraryPath().isEmpty())
{
buf.appendAscii("\n");
buf.append(info->getLibraryPaths());
buf.append(info->getLibraryPath());
buf.appendAscii("\n");
}
......
......@@ -33,7 +33,6 @@ public:
static rtl::Reference<VendorBase> createInstance();
using VendorBase::getLibraryPaths;
virtual char const* const* getRuntimePaths(int * size) SAL_OVERRIDE;
virtual char const* const* getLibraryPaths(int* size) SAL_OVERRIDE;
......
......@@ -54,12 +54,6 @@ VendorBase::VendorBase(): m_bAccessibility(false)
{
}
rtl::Reference<VendorBase> VendorBase::createInstance()
{
VendorBase *pBase = new VendorBase();
return rtl::Reference<VendorBase>(pBase);
}
bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
{
//get java.vendor, java.version, java.home,
......@@ -209,7 +203,7 @@ const OUString & VendorBase::getHome() const
return m_sHome;
}
const OUString & VendorBase::getLibraryPaths() const
const OUString & VendorBase::getLibraryPath() const
{
return m_sLD_LIBRARY_PATH;
}
......@@ -225,21 +219,11 @@ bool VendorBase::supportsAccessibility() const
bool VendorBase::needsRestart() const
{
if (!getLibraryPaths().isEmpty())
if (!getLibraryPath().isEmpty())
return true;
return false;
}
int VendorBase::compareVersions(const OUString& /*sSecond*/) const
{
OSL_FAIL("[Java framework] VendorBase::compareVersions must be "
"overridden in derived class.");
return 0;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -88,7 +88,9 @@ class VendorBase: public salhelper::SimpleReferenceObject
{
public:
VendorBase();
/* returns relative paths to the java executable as
/* static char const* const * getJavaExePaths(int* size);
returns relative paths to the java executable as
file URLs.
For example "bin/java.exe". You need
......@@ -103,9 +105,10 @@ public:
The signature of this function must correspond to
getJavaExePaths_func.
*/
static char const* const * getJavaExePaths(int* size);
/* creates an instance of this class. MUST be overridden
/* static rtl::Reference<VendorBase> createInstance();
creates an instance of this class. MUST be overridden
in a derived class.
####################################################
OVERRIDE in derived class
......@@ -113,7 +116,6 @@ public:
@param
Key - value pairs of the system properties of the JRE.
*/
static rtl::Reference<VendorBase> createInstance();
/* called automatically on the instance created by createInstance.
......@@ -132,18 +134,18 @@ public:
virtual char const* const* getLibraryPaths(int* size);
virtual const OUString & getVendor() const;
virtual const OUString & getVersion() const;
virtual const OUString & getHome() const;
virtual const OUString & getRuntimeLibrary() const;
virtual const OUString & getLibraryPaths() const;
virtual bool supportsAccessibility() const;
/* determines if prior to running java something has to be done,
like setting the LD_LIBRARY_PATH. This implementation checks
if an LD_LIBRARY_PATH (getLD_LIBRARY_PATH) needs to be set and
if so, needsRestart returns true.
*/
virtual bool needsRestart() const;
const OUString & getVendor() const;
const OUString & getVersion() const;
const OUString & getHome() const;
const OUString & getRuntimeLibrary() const;
const OUString & getLibraryPath() const;
bool supportsAccessibility() const;
/* determines if prior to running java something has to be done,
like setting the LD_LIBRARY_PATH. This implementation checks
if an LD_LIBRARY_PATH (getLD_LIBRARY_PATH) needs to be set and
if so, needsRestart returns true.
*/
bool needsRestart() const;
/* compares versions of this vendor. MUST be overridden
in a derived class.
......@@ -158,7 +160,7 @@ public:
@throw
MalformedVersionException if the version string was not recognized.
*/
virtual int compareVersions(const OUString& sSecond) const;
virtual int compareVersions(const OUString& sSecond) const = 0;
protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment