Class AttributeUtil


  • public class AttributeUtil
    extends java.lang.Object
    Collection of static methods for dealing with attributes.
    Since:
    5.4
    See Also:
    IASTAttribute, IASTAttributeOwner
    • Method Detail

      • hasAttribute

        public static boolean hasAttribute​(IASTAttributeOwner node,
                                           java.lang.String[] names)
        Returns true if a declarator has an attribute with one of the given names. The names array is assumed to be small.
      • hasNoreturnAttribute

        public static boolean hasNoreturnAttribute​(IASTAttributeOwner node)
        Returns true if the node has a "noreturn" or "__noreturn__" attribute.
      • hasNodiscardAttribute

        public static boolean hasNodiscardAttribute​(IASTAttributeOwner node)
        Returns true if the node has a "nodiscard" attribute.
        Since:
        7.0
      • getSimpleArgument

        public static char[] getSimpleArgument​(IASTAttribute attribute)
        Returns character representation of the attribute argument, or null if the attribute has zero or more than one argument.