com.h3c.of.sw

## Class SwitchDefn

- java.lang.Object
- - com.h3c.of.sw.AbstractDefn
  - - com.h3c.of.sw.SwitchDefn

-     public class SwitchDefn
      extends AbstractDefn

  Parses a mock-switch definition file and encapsulates the configuration.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SwitchDefn.CustomProp` Represents a property from the "custom" section of the mock switch definition file.

  - ### Field Summary

    - ### Fields inherited from class com.h3c.of.sw.AbstractDefn

      `EOL, EOLI, EOLI_DASH, reader`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwitchDefn(String path)` Constructs a switch definition, from the specified definition file.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CfgBase` | `getCfgBase()` Returns the base config object.
    `CfgDesc` | `getCfgDesc()` Returns the description config object.
    `CfgFeat` | `getCfgFeat()` Returns the features config object.
    `CfgHello` | `getCfgHello()` Returns the hello config object.
    `List<SwitchDefn.CustomProp>` | `getCustomProps()` Returns an unmodifiable view of the custom properties.
    `DataPathId` | `getDpid()` Returns the datapath id.
    `String` | `toDebugString()` Returns a multi-line string representation of this parsed switch definition.

    - ### Methods inherited from class com.h3c.of.sw.AbstractDefn

      `getPath, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SwitchDefn

          public SwitchDefn(String path)

      Constructs a switch definition, from the specified definition file.
      Parameters:
        `path` - the definition file path name

  - ### Method Detail

    - #### toDebugString

          public String toDebugString()

      Returns a multi-line string representation of this parsed switch definition.
      Overrides:
        `toDebugString` in class `AbstractDefn`
      Returns:
        a multi-line string representation

    - #### getDpid

          public DataPathId getDpid()

      Returns the datapath id.
      Returns:
        the datapath id

    - #### getCfgHello

          public CfgHello getCfgHello()

      Returns the hello config object.
      Returns:
        the hello config

    - #### getCfgBase

          public CfgBase getCfgBase()

      Returns the base config object.
      Returns:
        the base config

    - #### getCfgFeat

          public CfgFeat getCfgFeat()

      Returns the features config object.
      Returns:
        the features config

    - #### getCfgDesc

          public CfgDesc getCfgDesc()

      Returns the description config object.
      Returns:
        the description config

    - #### getCustomProps

          public List<SwitchDefn.CustomProp> getCustomProps()

      Returns an unmodifiable view of the custom properties.
      Returns:
        the custom properties

Copyright © 2014. All Rights Reserved.