com.smartgwt.client.types

## Enum LocatorTypeStrategy

- java.lang.Object
- - java.lang.Enum<LocatorTypeStrategy>
  - - com.smartgwt.client.types.LocatorTypeStrategy

- All Implemented Interfaces:
    ValueEnum, java.io.Serializable, java.lang.Comparable<LocatorTypeStrategy>

      public enum LocatorTypeStrategy
      extends java.lang.Enum<LocatorTypeStrategy>
      implements ValueEnum

  When attempting to identify a component from within a list of possible candidates as described `here`, if we are unable to find a unique match by name or title, we will use the recorded "type" of the component to verify an apparent match.

  By default we check the following properties in order:

  - Does the Class match?
  - If this is not a framework class, does the core framework superclass match?
  - Does the `role` match?
  In some cases an explicit locatorTypeStrategy can be specified to modify this behavior. As with `LocatorStrategy`, if we are unable to match using the specified type strategy we continue to test against the remaining strategies in order - so if a type strategy of "scClass" was specified but we were unable to find a match with the appropriate core superclass, we will attempt to match by role. Possible values are:

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CLASS` Match by class if possible
    `NONE` Don't attempt to compare type in any way
    `ROLE` Ignore class altogether and attempt to match by role
    `SCCLASS` Ignore specific class and match by the Smart GWT framework superclass.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getValue()`
    `static LocatorTypeStrategy` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static LocatorTypeStrategy[]` | `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

    - #### CLASS

          public static final LocatorTypeStrategy CLASS

      Match by class if possible

      If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "Class".

    - #### SCCLASS

          public static final LocatorTypeStrategy SCCLASS

      Ignore specific class and match by the Smart GWT framework superclass.

      If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "scClass".

    - #### ROLE

          public static final LocatorTypeStrategy ROLE

      Ignore class altogether and attempt to match by role

      If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "role".

    - #### NONE

          public static final LocatorTypeStrategy NONE

      Don't attempt to compare type in any way

      If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "none".

  - ### Method Detail

    - #### values

          public static LocatorTypeStrategy[] 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 (LocatorTypeStrategy c : LocatorTypeStrategy.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static LocatorTypeStrategy 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

    - #### getValue

          public java.lang.String getValue()

      Specified by:
        `getValue` in interface `ValueEnum`