We may be generating a competing construct, hence need to use
importedName for {IllegalArgument,NullPointer}Exception.
Change-Id: I3fe59a745bc17b292d8d50e6c55ef8669b0ee35a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
4c2990d640ee5cd0811e1c7af6f2664822f95cb8)
* </ul>
*
* @param arg grouping object
- * @throws IllegalArgumentException if given argument is none of valid types or has property with incompatible value
+ * @throws «IAE.importedName» if given argument is none of valid types or has property with incompatible value
*/
'''
*
* @param augmentation augmentation to be added
* @return this builder
- * @throws NullPointerException if {@code augmentation} is null
+ * @throws «NPE.importedName» if {@code augmentation} is null
*/
public «type.name» addAugmentation(«augmentTypeRef» augmentation) {
if (!(this.«AUGMENTATION_FIELD» instanceof «hashMapRef»)) {
def protected bitsArgs() '''
«JU_LIST.importedName»<«STRING.importedName»> properties = «Lists.importedName».newArrayList(«allProperties.propsAsArgs»);
if (!properties.contains(defaultValue)) {
- throw new «IllegalArgumentException.importedName»("invalid default parameter");
+ throw new «IAE.importedName»("invalid default parameter");
}
int i = 0;
return new «genTO.name»(
*
* @param name YANG assigned name
* @return corresponding «enums.name» item, if present
- * @throws NullPointerException if name is null
+ * @throws «NPE.importedName» if {@code name} is null
*/
public static «Optional.importedName»<«enums.name»> forName(«STRING.importedName» name) {
return «Optional.importedName».ofNullable(NAME_MAP.get(«JU_OBJECTS.importedName».requireNonNull(name)));
* {@code java.lang.Deprecated} as a JavaTypeName.
*/
static final @NonNull JavaTypeName DEPRECATED = JavaTypeName.create(Deprecated.class);
+ /**
+ * {@code java.lang.IllegalArgumentException} as a JavaTypeName.
+ */
+ static final @NonNull JavaTypeName IAE = JavaTypeName.create(IllegalArgumentException.class);
/**
* {@code java.lang.NullPointerException} as a JavaTypeName.
*/