Class UnparsedDSCComment
java.lang.Object
org.apache.xmlgraphics.ps.dsc.events.AbstractEvent
org.apache.xmlgraphics.ps.dsc.events.UnparsedDSCComment
- All Implemented Interfaces:
DSCParserConstants, DSCComment, DSCEvent
Represents a DSC comment that is not parsed into one of the concrete DSCComment subclasses.
It is used whenever a DSC comment is encountered that is unknown to the parser.
- See Also:
-
Field Summary
FieldsFields inherited from interface DSCParserConstants
COMMENT, DSC_COMMENT, EOF, HEADER_COMMENT, LINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCasts this instance to a DSCComment if possible.voidgenerate(PSGenerator gen) Writes the event to the given PSGenerator.intReturns the event type.getName()Returns the name of the DSC comment.booleanIndicates whether this DSC comment has values.booleanisAtend()Indicates whether the DSC comment's value is "Atend".booleanIndicates whether the instance is a DSC comment.voidparseValue(String value) Parses the value of the DSC comment.Methods inherited from class AbstractEvent
asLine, isComment, isHeaderComment, isLineMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DSCEvent
asLine, isComment, isHeaderComment, isLine
-
Field Details
-
name
-
value
-
-
Constructor Details
-
UnparsedDSCComment
Creates a new instance.- Parameters:
name- the name of the DSC comment
-
-
Method Details
-
getName
Description copied from interface:DSCCommentReturns the name of the DSC comment.- Specified by:
getNamein interfaceDSCComment- Returns:
- the name of the DSC comment (without the "%%" prefix)
- See Also:
-
hasValues
public boolean hasValues()Description copied from interface:DSCCommentIndicates whether this DSC comment has values.- Specified by:
hasValuesin interfaceDSCComment- Returns:
- true if the DSC comment has values
- See Also:
-
isAtend
public boolean isAtend()Description copied from interface:DSCCommentIndicates whether the DSC comment's value is "Atend".- Specified by:
isAtendin interfaceDSCComment- Returns:
- true if the value is "Atend"
- See Also:
-
parseValue
Description copied from interface:DSCCommentParses the value of the DSC comment.- Specified by:
parseValuein interfaceDSCComment- Parameters:
value- the value- See Also:
-
generate
Description copied from interface:DSCEventWrites the event to the given PSGenerator.- Specified by:
generatein interfaceDSCComment- Specified by:
generatein interfaceDSCEvent- Parameters:
gen- the PSGenerator to write to- Throws:
IOException- In case of an I/O error- See Also:
-
isDSCComment
public boolean isDSCComment()Description copied from interface:DSCEventIndicates whether the instance is a DSC comment.- Specified by:
isDSCCommentin interfaceDSCEvent- Overrides:
isDSCCommentin classAbstractEvent- Returns:
- true if the instance is a DSC comment
- See Also:
-
getEventType
public int getEventType()Description copied from interface:DSCEventReturns the event type.- Specified by:
getEventTypein interfaceDSCEvent- Returns:
- the event type (see
DSCParserConstants) - See Also:
-
asDSCComment
Description copied from interface:DSCEventCasts this instance to a DSCComment if possible.- Specified by:
asDSCCommentin interfaceDSCEvent- Overrides:
asDSCCommentin classAbstractEvent- Returns:
- this event as a DSCComment
- See Also:
-