public static enum ParsingOptions.PACKAGE_LOOKUP_STRATEGIES extends Enum<ParsingOptions.PACKAGE_LOOKUP_STRATEGIES>
Enum Constant and Description |
---|
LOOKUP_PACKAGE_BY_ALIAS
LOOKUP_PACKAGE_BY_ALIAS ignores hierarchical context and just
looks up the first package name as the 'nsURI' key in the package registry
of the root environment.
|
LOOKUP_PACKAGE_BY_ALIAS_THEN_NAME
LOOKUP_PACKAGE_BY_ALIAS_THEN_NAME combines the alias and
traditional strategies.
|
LOOKUP_PACKAGE_BY_NAME
LOOKUP_PACKAGE_BY_NAME is the default and traditional
behavior whereby the first package name is resolved by recursive
search from names in the current environment to parent environments.
|
Modifier and Type | Method and Description |
---|---|
static ParsingOptions.PACKAGE_LOOKUP_STRATEGIES |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ParsingOptions.PACKAGE_LOOKUP_STRATEGIES[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ParsingOptions.PACKAGE_LOOKUP_STRATEGIES LOOKUP_PACKAGE_BY_NAME
The outward direction of this search allows inner environments to occlude outer definitions and in some cases may make outer definitions inaccessible.
public static final ParsingOptions.PACKAGE_LOOKUP_STRATEGIES LOOKUP_PACKAGE_BY_ALIAS
This strategy therefore supports a possible import syntax such as:
import OclEcore 'http://www.eclipse.org/ocl/1.1.0/Ecore'in which OclEcore is defined as an alias for the OCL Ecore package.
More than one 'alias' may map to the same package.
This strategy is only supported for the Ecore binding.
public static final ParsingOptions.PACKAGE_LOOKUP_STRATEGIES LOOKUP_PACKAGE_BY_ALIAS_THEN_NAME
This strategy ensures that package name aliases cannot be occluded.
In order to use this strategy and avoid cluttering a registry of
packages that may serve other purposes, it is recommended that the
root environment is created with a fresh
registry
that is
populated with the packages required, e.g., by copying all contents
of the default package registry
using Map.putAll(java.util.Map)
. Note, that this
will copy unresolved package descriptors to the new registry without
resolving them.
This strategy is only supported for the Ecore binding.
public static ParsingOptions.PACKAGE_LOOKUP_STRATEGIES[] values()
for (ParsingOptions.PACKAGE_LOOKUP_STRATEGIES c : ParsingOptions.PACKAGE_LOOKUP_STRATEGIES.values()) System.out.println(c);
public static ParsingOptions.PACKAGE_LOOKUP_STRATEGIES valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.