org.apache.felix.scrplugin
Enum SpecVersion

java.lang.Object
  extended by java.lang.Enum<SpecVersion>
      extended by org.apache.felix.scrplugin.SpecVersion
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SpecVersion>

public enum SpecVersion
extends java.lang.Enum<SpecVersion>

An enumeration for all available spec versions. The versions in the enumeration have to be ordered, higher versions must have a higher ordinal.


Enum Constant Summary
VERSION_1_0
           
VERSION_1_1
           
VERSION_1_1_FELIX
           
VERSION_1_2
           
 
Method Summary
static SpecVersion fromName(java.lang.String n)
          Creates a version for the given name.
static SpecVersion fromNamespaceUrl(java.lang.String n)
          Creates a version for the given url.
 java.lang.String getName()
          Returns the human readable type name of this type.
 java.lang.String getNamespaceUrl()
          Return the namespace url.
static SpecVersion valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SpecVersion[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

VERSION_1_0

public static final SpecVersion VERSION_1_0

VERSION_1_1

public static final SpecVersion VERSION_1_1

VERSION_1_1_FELIX

public static final SpecVersion VERSION_1_1_FELIX

VERSION_1_2

public static final SpecVersion VERSION_1_2
Method Detail

values

public static SpecVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SpecVersion c : SpecVersion.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SpecVersion valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getName

public java.lang.String getName()
Returns the human readable type name of this type.

Returns:
the name

getNamespaceUrl

public java.lang.String getNamespaceUrl()
Return the namespace url.

Returns:
The namespace url.

fromName

public static SpecVersion fromName(java.lang.String n)
Creates a version for the given name. If the name cannot be mapped to a enum type or if it's null, null is returned.

Parameters:
n - the name
Returns:
the type or null

fromNamespaceUrl

public static SpecVersion fromNamespaceUrl(java.lang.String n)
Creates a version for the given url. If the url cannot be mapped to a enum type or if it's null, null is returned.

Parameters:
n - the url
Returns:
the type or null


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.