@classmethod
def integer(cls, integer, bits=None):
    """
        @type  integer: int
        @param integer: Integer.

        @type  bits: int
        @param bits:
            (Optional) Number of bits of the target architecture.
            The default is platform dependent. See: L{HexOutput.integer_size}

        @rtype:  str
        @return: Text output.
        """
    if bits is None:
        integer_size = cls.integer_size
    else:
        integer_size = bits / 4 + 2
    if integer >= 0:
        return '0x%%.%dx' % (integer_size - 2) % integer
    return '-0x%%.%dx' % (integer_size - 2) % -integer
