Class AbstractResourceDSCComment

All Implemented Interfaces:
DSCParserConstants, DSCComment, DSCEvent
Direct Known Subclasses:
DSCCommentBeginResource, DSCCommentIncludeResource

public abstract class AbstractResourceDSCComment extends AbstractDSCComment
Abstract base class for resource comments.
  • Constructor Details

    • AbstractResourceDSCComment

      public AbstractResourceDSCComment()
      Creates a new instance
    • AbstractResourceDSCComment

      public AbstractResourceDSCComment(PSResource resource)
      Creates a new instance for a given PSResource instance
      Parameters:
      resource - the resource
  • Method Details

    • getResource

      public PSResource getResource()
      Returns the associated PSResource.
      Returns:
      the resource
    • hasValues

      public boolean hasValues()
      Indicates whether this DSC comment has values.
      Returns:
      true if the DSC comment has values
    • parseValue

      public void parseValue(String value)
      Parses the value of the DSC comment.
      Parameters:
      value - the value
    • generate

      public void generate(PSGenerator gen) throws IOException
      Writes the event to the given PSGenerator.
      Parameters:
      gen - the PSGenerator to write to
      Throws:
      IOException - In case of an I/O error
      See Also: