Class DSCCommentBeginDocument

All Implemented Interfaces:
DSCParserConstants, DSCComment, DSCEvent

public class DSCCommentBeginDocument extends AbstractDSCComment
Represents a %BeginDocument DSC comment.
  • Constructor Details

    • DSCCommentBeginDocument

      public DSCCommentBeginDocument()
      Creates a new instance
    • DSCCommentBeginDocument

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

      public DSCCommentBeginDocument(PSResource resource, Float version, String type)
      Creates a new instance for a given PSResource instance
      Parameters:
      resource - the resource
      version - the version of the resource (or null)
      type - the type of resource (or null)
  • Method Details

    • getVersion

      public Float getVersion()
      Returns the resource version.
      Returns:
      the resource version (or null if not applicable)
    • getType

      public String getType()
      Returns the resource type
      Returns:
      the resource type (or null if not applicable)
    • getName

      public String getName()
      Returns the name of the DSC comment.
      Returns:
      the name of the DSC comment (without the "%%" prefix)
    • 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: