Package com.snmp4j.smi
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 TypeMethodDescriptionGets the syntax elements, i.e.Returns the DISPLAY-HINT clause of the TEXTUAL-CONVENTION referenced by this syntax of typeSmiSyntaxType.CONVENTION
.Returns the resolved syntax.int
Returns the BER syntax identifier for the simple of application type this syntax is based on.Returns the value of the syntax clause.getType()
Returns the type of syntax clause.boolean
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. SeegetType()
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 bygetElements()
are of typeSmiSyntaxElement.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 typeSmiSyntaxType.APPLICATION
orSmiSyntaxType.SIMPLE
. Thus, a syntax of typeSmiSyntaxType.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. Ifnull
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 typeSmiSyntaxType.CONVENTION
.- Returns:
- the display hint string or
null
ifgetType()
is notSmiSyntaxType.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
.
-