Enum 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 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 name
        java.lang.NullPointerException - if the argument is null
      • includeQualifiedNames

        public boolean includeQualifiedNames()
        Returns whether qualified names shall be included.
        Returns:
        true if they shall be included, false else
      • includeUnqualifiedNames

        public boolean includeUnqualifiedNames()
        Returns whether unqualified names shall be included.
        Returns:
        true if they shall be included, false else
      • includeVariableDeclarations

        public boolean includeVariableDeclarations()
        Returns whether variable declarations shall be included per se.
        Returns:
        true if they shall be included, false else
      • includeOperations

        public boolean includeOperations()
        Returns whether available operations shall be included.
        Returns:
        true if they shall be included, false else
      • includeOperationDefinitions

        public boolean includeOperationDefinitions()
        Returns whether operation definitions shall be included.
        Returns:
        true if they shall be included, false else
      • includeConstraints

        public boolean includeConstraints()
        Returns whether constraints shall be included.
        Returns:
        true if they shall be included, false else
      • includeEvals

        public boolean includeEvals()
        Returns whether evals shall be included.
        Returns:
        true if they shall be included, false else
      • includeLets

        public boolean includeLets()
        Returns whether lets shall be included.
        Returns:
        true if they shall be included, false else