org.eclipse.osgi.internal.baseadaptor
Class InvalidVersion

java.lang.Object
  extended by org.osgi.framework.Version
      extended by org.eclipse.osgi.internal.baseadaptor.InvalidVersion
All Implemented Interfaces:
Comparable<Version>

public class InvalidVersion
extends Version

This class is used to hold invalid version strings. This is used to support OSGi R3 bundles which could have an invalid Bundle-Version header. An InvalidVersion always has a value of 0.0.0.


Field Summary
 
Fields inherited from class org.osgi.framework.Version
emptyVersion
 
Constructor Summary
InvalidVersion(String badVersion)
          Constructs a BadVersion using the specified invalid version string.
 
Method Summary
 String getInvalidVersion()
          Returns the invalid version string.
 String toString()
          Returns the string representation of this version identifier.
 
Methods inherited from class org.osgi.framework.Version
compareTo, equals, getMajor, getMicro, getMinor, getQualifier, hashCode, parseVersion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvalidVersion

public InvalidVersion(String badVersion)
Constructs a BadVersion using the specified invalid version string.

Parameters:
badVersion - an invalid version string.
Method Detail

getInvalidVersion

public String getInvalidVersion()
Returns the invalid version string.

Returns:
the invalid version string.

toString

public String toString()
Description copied from class: Version
Returns the string representation of this version identifier.

The format of the version string will be major.minor.micro if qualifier is the empty string or major.minor.micro.qualifier otherwise.

Overrides:
toString in class Version
Returns:
The string representation of this version identifier.


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.