|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ParsingOptions.PACKAGE_LOOKUP_STRATEGIES> org.eclipse.ocl.options.ParsingOptions.PACKAGE_LOOKUP_STRATEGIES
public static enum ParsingOptions.PACKAGE_LOOKUP_STRATEGIES
The alternative strategies for resolving the package name at the start of a path name. The default LOOKUP_PACKAGE_BY_NAME strategy supports the OMG 2.2 specification. The alternate strategies support a potential extension for 'import' statements.
Enum Constant Summary | |
---|---|
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. |
Method Summary | |
---|---|
static ParsingOptions.PACKAGE_LOOKUP_STRATEGIES |
valueOf(java.lang.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. |
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 |
---|
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.
Method Detail |
---|
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(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |