ilog.rules.brl.translation

Class IlrHeaderStatement

  • All Implemented Interfaces:
    java.io.Serializable


    public class IlrHeaderStatement
    extends IlrStatement
    This statement represents a 'header' for the generated code.

    A header could be anything printed before the actual generated code. Currently, the only predefined headers are IRL 'use' clause and IRL 'import' clause. If you wish to create a new kind of header, you should set a kind starting from CUSTOM_EXTENSION.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int COMMENT
      Constant for defining a IlrHeaderStatement of type "comment" (value is 2).
      static int CUSTOM_EXTENSION
      Constant for defining a custom kind of IlrHeaderStatement (value is 10).
      static int USE
      Constant for defining anIlrHeaderStatement of type "use" (value is 0).
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int getKind()
      Gets the kind of this header statement.
      java.lang.String getValue()
      Gets the value string of this header statement.
      void setKind(int kind)
      Sets the kind of this header statement.
      void setValue(java.lang.String value)
      Sets the value string of this header statement.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • USE

        public static final int USE
        Constant for defining anIlrHeaderStatement of type "use" (value is 0).
        See Also:
        Constant Field Values
      • COMMENT

        public static final int COMMENT
        Constant for defining a IlrHeaderStatement of type "comment" (value is 2).
        See Also:
        Constant Field Values
      • CUSTOM_EXTENSION

        public static final int CUSTOM_EXTENSION
        Constant for defining a custom kind of IlrHeaderStatement (value is 10).
        See Also:
        Constant Field Values
    • Constructor Detail

      • IlrHeaderStatement

        public IlrHeaderStatement(IlrSyntaxTree.Node node,
                          java.lang.String value)
        Creates a new IlrHeaderStatement with the specified node and value. The kind of such an header statement is USE.
        Parameters:
        node - The node.
        value - The value.
      • IlrHeaderStatement

        public IlrHeaderStatement(IlrSyntaxTree.Node node,
                          java.lang.String value,
                          int kind)
        Creates a new IlrHeaderStatement with the specified node, value and kind.
        Parameters:
        node - The node.
        value - The value.
        kind - The kind of header statement.
    • Method Detail

      • getKind

        public int getKind()
        Gets the kind of this header statement.
        Returns:
        The kind of this header statement.
      • setKind

        public void setKind(int kind)
        Sets the kind of this header statement.
        Parameters:
        kind - The kind of this header statement.
      • getValue

        public java.lang.String getValue()
        Gets the value string of this header statement.
        Returns:
        The value string of this header statement.
      • setValue

        public void setValue(java.lang.String value)
        Sets the value string of this header statement.
        Parameters:
        value - The new value string.

© Copyright IBM Corp. 1987, 2017