Enum SearchContext
- java.lang.Object
-
- java.lang.Enum<SearchContext>
-
- net.ssehub.easy.varModel.model.search.SearchContext
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SearchContext>
public enum SearchContext extends java.lang.Enum<SearchContext>
Defines some search contexts, i.e. to hint the search whether local variables shall be included.- Author:
- Holger Eichelberger
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLInclude all element types.COMPOUNDSearch within compound level.CONSTRAINTSearch within a constraint.EVALSearch within an eval.FREEZESearch within a freeze.IDSearch for only, i.e.LETSearch within a let expression.OPERATION_DEFINITIONSearch within an operation definition.PROJECTSearch on project level.QUALIFIED_NAMESearch for qualified names.
-
Field Summary
Fields Modifier and Type Field Description private booleanincludeConstraintsprivate booleanincludeEvalsprivate booleanincludeLetsprivate booleanincludeOperationDefinitionsprivate booleanincludeOperationsprivate booleanincludeQualifiedNamesprivate booleanincludeUnqualifiedNamesprivate booleanincludeVariableDeclarations
-
Constructor Summary
Constructors Modifier Constructor Description privateSearchContext(java.lang.String spec)Creates a new search context.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanincludeConstraints()Returns whether constraints shall be included.booleanincludeEvals()Returns whether evals shall be included.booleanincludeLets()Returns whether lets shall be included.booleanincludeOperationDefinitions()Returns whether operation definitions shall be included.booleanincludeOperations()Returns whether available operations shall be included.booleanincludeQualifiedNames()Returns whether qualified names shall be included.booleanincludeUnqualifiedNames()Returns whether unqualified names shall be included.booleanincludeVariableDeclarations()Returns whether variable declarations shall be included per se.static SearchContextvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static SearchContext[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALL
public static final SearchContext ALL
Include all element types.
-
ID
public static final SearchContext ID
Search for only, i.e. unqualified names.
-
QUALIFIED_NAME
public static final SearchContext QUALIFIED_NAME
Search for qualified names.
-
PROJECT
public static final SearchContext PROJECT
Search on project level.
-
COMPOUND
public static final SearchContext COMPOUND
Search within compound level.
-
CONSTRAINT
public static final SearchContext CONSTRAINT
Search within a constraint.
-
OPERATION_DEFINITION
public static final SearchContext OPERATION_DEFINITION
Search within an operation definition.
-
FREEZE
public static final SearchContext FREEZE
Search within a freeze.
-
EVAL
public static final SearchContext EVAL
Search within an eval.
-
LET
public static final SearchContext LET
Search within a let expression.
-
-
Field Detail
-
includeQualifiedNames
private boolean includeQualifiedNames
-
includeUnqualifiedNames
private boolean includeUnqualifiedNames
-
includeVariableDeclarations
private boolean includeVariableDeclarations
-
includeOperations
private boolean includeOperations
-
includeOperationDefinitions
private boolean includeOperationDefinitions
-
includeConstraints
private boolean includeConstraints
-
includeEvals
private boolean includeEvals
-
includeLets
private boolean includeLets
-
-
Constructor Detail
-
SearchContext
private SearchContext(java.lang.String spec)
Creates a new search context. We use a string here as parameter as we otherwise would have more than 5 parameters in total.- Parameters:
spec- the specification of included elements, "q" stands for qualified names, "u" stands for unqualified names, "v" for variable declarations, "o" for operations, "O" for operation definitions, "c" for constraints, "e" for evals, "l" for lets
-
-
Method Detail
-
values
public static SearchContext[] 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 (SearchContext c : SearchContext.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SearchContext 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 namejava.lang.NullPointerException- if the argument is null
-
includeQualifiedNames
public boolean includeQualifiedNames()
Returns whether qualified names shall be included.- Returns:
trueif they shall be included,falseelse
-
includeUnqualifiedNames
public boolean includeUnqualifiedNames()
Returns whether unqualified names shall be included.- Returns:
trueif they shall be included,falseelse
-
includeVariableDeclarations
public boolean includeVariableDeclarations()
Returns whether variable declarations shall be included per se.- Returns:
trueif they shall be included,falseelse
-
includeOperations
public boolean includeOperations()
Returns whether available operations shall be included.- Returns:
trueif they shall be included,falseelse
-
includeOperationDefinitions
public boolean includeOperationDefinitions()
Returns whether operation definitions shall be included.- Returns:
trueif they shall be included,falseelse
-
includeConstraints
public boolean includeConstraints()
Returns whether constraints shall be included.- Returns:
trueif they shall be included,falseelse
-
includeEvals
public boolean includeEvals()
Returns whether evals shall be included.- Returns:
trueif they shall be included,falseelse
-
includeLets
public boolean includeLets()
Returns whether lets shall be included.- Returns:
trueif they shall be included,falseelse
-
-