Package groovy.transform
Class Undefined
java.lang.Object
groovy.transform.Undefined
Java doesn't allow you to have null as an attribute value. It wants you to indicate what you really
mean by null, so that is what we do here - as ugly as it is.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSentinel type used when an annotation member has no explicit class value.static final classSentinel exception type used when an annotation member has no explicit exception value. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisUndefined(String other) Tests whether the supplied string is the undefined sentinel.static booleanisUndefined(ClassNode other) Tests whether the supplied class node is the undefined class sentinel.static booleanisUndefinedException(ClassNode other) Tests whether the supplied class node is the undefined exception sentinel.
-
Field Details
-
STRING
Sentinel string value used when an annotation member has no explicit string value.- See Also:
-
-
Method Details
-
isUndefined
Tests whether the supplied string is the undefined sentinel.- Parameters:
other- the value to test- Returns:
trueif the value is undefined
-
isUndefined
Tests whether the supplied class node is the undefined class sentinel.- Parameters:
other- the class node to test- Returns:
trueif the value is undefined
-
isUndefinedException
Tests whether the supplied class node is the undefined exception sentinel.- Parameters:
other- the class node to test- Returns:
trueif the value is undefined
-