Package org.eclipse.cdt.core.parser.util
Class AttributeUtil
- java.lang.Object
-
- org.eclipse.cdt.core.parser.util.AttributeUtil
-
public class AttributeUtil extends Object
Collection of static methods for dealing with attributes.- Since:
- 5.4
- See Also:
IASTAttribute,IASTAttributeOwner
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static char[]getSimpleArgument(IASTAttribute attribute)Returns character representation of the attribute argument, ornullif the attribute has zero or more than one argument.static booleanhasAttribute(IASTAttributeOwner node, String[] names)Returnstrueif a declarator has an attribute with one of the given names.static booleanhasNodiscardAttribute(IASTAttributeOwner node)Returnstrueif the node has a "nodiscard" attribute.static booleanhasNoreturnAttribute(IASTAttributeOwner node)Returnstrueif the node has a "noreturn" or "__noreturn__" attribute.
-
-
-
Method Detail
-
hasAttribute
public static boolean hasAttribute(IASTAttributeOwner node, String[] names)
Returnstrueif a declarator has an attribute with one of the given names. Thenamesarray is assumed to be small.
-
hasNoreturnAttribute
public static boolean hasNoreturnAttribute(IASTAttributeOwner node)
Returnstrueif the node has a "noreturn" or "__noreturn__" attribute.
-
hasNodiscardAttribute
public static boolean hasNodiscardAttribute(IASTAttributeOwner node)
Returnstrueif the node has a "nodiscard" attribute.- Since:
- 7.0
-
getSimpleArgument
public static char[] getSimpleArgument(IASTAttribute attribute)
Returns character representation of the attribute argument, ornullif the attribute has zero or more than one argument.
-
-