PSSetupCode (Apache FOP Core 2.11 API)
Date: 2025-04-24

org.apache.fop.render.ps.extensions

## Class PSSetupCode

- java.lang.Object
- - org.apache.fop.render.ps.extensions.PSExtensionAttachment
  - - org.apache.fop.render.ps.extensions.PSSetupCode

- All Implemented Interfaces:
    ExtensionAttachment, org.apache.xmlgraphics.util.XMLizable

      public class PSSetupCode
      extends PSExtensionAttachment

  This is the pass-through value object for the PostScript extension.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static String` | `ELEMENT` element name
    `protected String` | `name` name attribute

    - ### Fields inherited from class org.apache.fop.render.ps.extensions.PSExtensionAttachment

      `CATEGORY, content`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PSSetupCode()` No-argument contructor.
    `PSSetupCode(String name, String content)` Default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getCategory()` This method returns a category URI that allows a processor (layout manager or renderer) to determine if it supports this object.
    `protected String` | `getElement()`
    `String` | `getName()`
    `void` | `setName(String name)` Sets the name of the setup code object.
    `void` | `toSAX(ContentHandler handler)` Generates SAX events representing the object's state.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.fop.render.ps.extensions.PSExtensionAttachment

      `getContent, getType, setContent`

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

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

- - ### Field Detail

    - #### ELEMENT

          protected static final String ELEMENT

      element name
      See Also:
        Constant Field Values

    - #### name

          protected String name

      name attribute

  - ### Constructor Detail

    - #### PSSetupCode

          public PSSetupCode()

      No-argument contructor.

    - #### PSSetupCode

          public PSSetupCode(String name,
                             String content)

      Default constructor.
      Parameters:
        `name` - the name of the setup code object, may be null
        `content` - the content of the setup code object

  - ### Method Detail

    - #### getName

          public String getName()

      Returns:
        the name

    - #### setName

          public void setName(String name)

      Sets the name of the setup code object.
      Parameters:
        `name` - The name to set.

    - #### getCategory

          public String getCategory()

      This method returns a category URI that allows a processor (layout manager or renderer) to determine if it supports this object.
      Specified by:
        `getCategory` in interface `ExtensionAttachment`
      Overrides:
        `getCategory` in class `PSExtensionAttachment`
      Returns:
        the category URI
      See Also:
        `ExtensionAttachment.getCategory()`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `PSExtensionAttachment`
      Returns:
        a string representation of this object
      See Also:
        `Object.toString()`

    - #### getElement

          protected String getElement()

      Specified by:
        `getElement` in class `PSExtensionAttachment`
      Returns:
        the element name
      See Also:
        `PSExtensionAttachment.getElement()`

    - #### toSAX

          public void toSAX(ContentHandler handler)
                     throws SAXException

      Generates SAX events representing the object's state.
      Specified by:
        `toSAX` in interface `org.apache.xmlgraphics.util.XMLizable`
      Overrides:
        `toSAX` in class `PSExtensionAttachment`
      Parameters:
        `handler` - ContentHandler instance to send the SAX events to
      Throws:
        `SAXException` - if there's a problem generating the SAX events
      See Also:
        `XMLizable.toSAX(org.xml.sax.ContentHandler)`

Copyright © 2025 Apache Software Foundation. All rights reserved.