# Interface SmiSyntax

All Known Implementing Classes:
  `SmiSyntaxImpl`

public interface SmiSyntax
The SmiSyntax represents the SYNTAX clause of OBJECT-TYPE or TEXTUAL-CONVENTION SMI constructs.

Since:
  1.2 (Pro edition only)
Author:
  Frank Fock

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<SmiSyntaxElement>`
  `getElements()`
  Gets the syntax elements, i.e. range or enumeration elements.
  `String`
  `getResolvedDisplayHint()`
  Returns the DISPLAY-HINT clause of the TEXTUAL-CONVENTION referenced by this syntax of type `SmiSyntaxType.CONVENTION`.
  `SmiSyntax`
  `getResolvedSyntax()`
  Returns the resolved syntax.
  `int`
  `getSyntax()`
  Returns the BER syntax identifier for the simple of application type this syntax is based on.
  `String`
  `getSyntaxClause()`
  Returns the value of the syntax clause.
  `SmiSyntaxType`
  `getType()`
  Returns the type of syntax clause.
  `boolean`
  `isEnumeration()`
  Indicates whether this SYNTAX clause is an enumeration.

- ## Method Details

  - ### getSyntaxClause

    String getSyntaxClause()
    Returns the value of the syntax clause. This can be a simple (INTEGER, OCTET STRING, etc.) or application type (Integer32, ..) as well as a reference to a textual convention or SMIv1 syntax definition. For tables, a sequence definition is returned. See `getType()` for details.
    Returns:
      the value of the SYNTAX clause.

  - ### getElements

    List<SmiSyntaxElement> getElements()
    Gets the syntax elements, i.e. range or enumeration elements. The returned list will never contain a mixture of both elements.
    Returns:
      the list of syntax elements or `null` if the syntax has no elements.

  - ### isEnumeration

    boolean isEnumeration()
    Indicates whether this SYNTAX clause is an enumeration.
    Returns:
      Return `true` only if all elements returned by `getElements()` are of type `SmiSyntaxElement.Type.Enumeration`.
    Since:
      1.3.2

  - ### getType

    SmiSyntaxType getType()
    Returns the type of syntax clause.
    Returns:
      the type identifier of the SYNTAX clause.
    Since:
      1.3.2

  - ### getResolvedSyntax

    SmiSyntax getResolvedSyntax()
    Returns the resolved syntax. The resolved syntax is of type `SmiSyntaxType.APPLICATION` or `SmiSyntaxType.SIMPLE`. Thus, a syntax of type `SmiSyntaxType.CONVENTION` will return the SmiSyntax as defined by the referenced textual convention. Note: TEXTUAL CONVENTION and SMIv1 syntax assignments must not be nested in SMIv2. For SMIv1, the effective (artificial) syntax is returned for nested conventions.
    Returns:
      the resolved syntax for a convention syntax or `this` otherwise. If `null` is returned, the referenced convention could not be resolved with the currently loaded MIB modules.
    Since:
      1.3.2

  - ### getResolvedDisplayHint

    String getResolvedDisplayHint()
    Returns the DISPLAY-HINT clause of the TEXTUAL-CONVENTION referenced by this syntax of type `SmiSyntaxType.CONVENTION`.
    Returns:
      the display hint string or `null` if `getType()` is not `SmiSyntaxType.CONVENTION` or the resolved textual convention has no display hint.
    Since:
      1.3.2

  - ### getSyntax

    int getSyntax()
    Returns the BER syntax identifier for the simple of application type this syntax is based on.
    Returns:
      a syntax identifier defined by `BER`.