public class DiscriminatorRegistry extends Object
The DiscriminatorRegistry class is used to map between a Discriminator's integer identifier, its short name, and its URI.
This class is subject to change as needs evolve.
Modifier and Type | Field and Description |
---|---|
protected static long |
BANK_SIZE |
Constructor and Description |
---|
DiscriminatorRegistry() |
Modifier and Type | Method and Description |
---|---|
static List<Discriminator> |
discriminators() |
static String |
get(long type) |
static long |
get(String name)
Returns a non-negative number corresponding to the
discriminator value associated with this
name . |
static long[] |
getAncestors(Discriminator d) |
static long[] |
getAncestors(long type) |
static Discriminator |
getByName(String name) |
static Discriminator |
getByType(long type) |
static Discriminator |
getByUri(String uri) |
static String |
getName(long type) |
static String |
getName(String uri) |
static long |
getType(String key) |
static String |
getUri(long type) |
static String |
getUri(String name) |
static String |
getUriByReflection(String name) |
static void |
initialize()
Initializes the DiscriminatorRegistry.
|
static boolean |
isa(long type,
long parentType)
Returns true if the discriminator
parentName
is a super-type of the type discriminator. |
static boolean |
isa(String name,
String parentName)
Returns true if the discriminator
parentName
is a super-type of the name discriminator. |
static String[] |
names() |
static long[] |
types()
Returns a list (array) of all discriminator values used
by the registry.
|
protected static final long BANK_SIZE
public static Discriminator getByName(String name)
public static Discriminator getByUri(String uri)
public static Discriminator getByType(long type)
public static long getType(String key)
public static String getName(long type)
public static String getUri(long type)
public static long[] types()
public static String[] names()
public static List<Discriminator> discriminators()
public static long get(String name)
name
.
Returns a negative value is there is no such discriminator.name
- The name of the discriminatorpublic static String get(long type)
public static boolean isa(String name, String parentName)
parentName
is a super-type of the name
discriminator.
Returns false otherwise.public static boolean isa(long type, long parentType)
parentName
is a super-type of the type
discriminator.
Returns false otherwise.public static long[] getAncestors(long type)
public static long[] getAncestors(Discriminator d)
public static void initialize() throws IOException
IOException
Copyright © 2013–2019 The Language Application Grid. All rights reserved.