java.lang.Object
com.google.common.io.CharSource
org.opendaylight.yangtools.yang.model.api.source.YangTextSource
org.opendaylight.yangtools.yang.model.spi.source.FileYangTextSource
All Implemented Interfaces:
Delegator<Path>, Immutable, SourceRepresentation, YangSourceRepresentation

@NonNullByDefault public class FileYangTextSource extends YangTextSource
A YangTextSource backed by a file.
  • Constructor Details

    • FileYangTextSource

      public FileYangTextSource(SourceIdentifier sourceId, Path path, Charset charset)
      Default constructor.
      Parameters:
      path - Backing path
      sourceId - source identifier
      charset - expected stream character set
      Throws:
      NullPointerException - if any argument is null
      IllegalArgumentException - if the supplied path is not a regular file
    • FileYangTextSource

      public FileYangTextSource(Path path)
      Utility constructor. Derives the SourceIdentifier from Path and assumes UTF-8 encoding.
      Parameters:
      path - backing path
      Throws:
      NullPointerException - if path is null
  • Method Details