public class RegisteredTypeNaming
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OSGI_SYMBOLIC_NAME_REGEX |
static java.lang.String |
OSGI_TOKEN_CHARS |
static java.lang.String |
OSGI_TOKEN_REGEX |
Constructor and Description |
---|
RegisteredTypeNaming() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isGoodBrooklynTypeColonVersion(java.lang.String candidate)
True if the argument has exactly one colon, and the part before
satisfies
isGoodTypeName(String) and the part after
isGoodBrooklynVersion(String) . |
static boolean |
isGoodBrooklynVersion(java.lang.String candidate) |
static boolean |
isGoodTypeName(java.lang.String candidate)
We recommend type names be OSGi symbolic names, such as:
com.acme-group.1-Virtual-Machine
Note that this is more permissive than Java, allowing hyphens and
allowing segments to start with numbers. |
static boolean |
isUsableTypeColonVersion(java.lang.String candidate)
True if the argument has exactly one colon, and the part before
satisfies
isUsableTypeName(String) and the part after isUsableVersion(String) . |
static boolean |
isUsableTypeName(java.lang.String candidate)
For type names we currently work with any non-empty string that does not contain
a ':' or whitespace or forward slash or backslash.
|
static boolean |
isUsableVersion(java.lang.String candidate) |
static boolean |
isValidOsgiTypeColonVersion(java.lang.String candidate)
True if the argument has exactly one colon, and the part before
satisfies
isGoodTypeName(String) and the part after
isValidOsgiVersion(String) . |
static boolean |
isValidOsgiVersion(java.lang.String candidate) |
public static final java.lang.String OSGI_TOKEN_CHARS
public static final java.lang.String OSGI_TOKEN_REGEX
public static final java.lang.String OSGI_SYMBOLIC_NAME_REGEX
public static boolean isUsableTypeName(java.lang.String candidate)
isGoodTypeName(String)
.
In some places (eg bundles) the use of OSGi symbolic names may be enforced.public static boolean isGoodTypeName(java.lang.String candidate)
com.acme-group.1-Virtual-Machine
Note that this is more permissive than Java, allowing hyphens and
allowing segments to start with numbers.
However it is also more restrictive: OSGi does not allow
accented characters or most punctuation. Only hyphens and underscores are allowed
in segment names, and periods are allowed only as segment separators.public static boolean isUsableVersion(java.lang.String candidate)
public static boolean isGoodBrooklynVersion(java.lang.String candidate)
public static boolean isValidOsgiVersion(java.lang.String candidate)
public static boolean isUsableTypeColonVersion(java.lang.String candidate)
isUsableTypeName(String)
and the part after isUsableVersion(String)
.public static boolean isGoodBrooklynTypeColonVersion(java.lang.String candidate)
isGoodTypeName(String)
and the part after
isGoodBrooklynVersion(String)
.public static boolean isValidOsgiTypeColonVersion(java.lang.String candidate)
isGoodTypeName(String)
and the part after
isValidOsgiVersion(String)
.