diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-08-28 00:02:15 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-08-28 00:02:15 +0200 |
commit | e1ee1b7d2db1ea998aa4d6aa3f6b4141315a9496 (patch) | |
tree | 5f014017561f6a9cff56e8ad35f2c6e3cf7b882e /src/lombok/core | |
parent | d16775032b638789f998f3f362b7ed7d4f5098ae (diff) | |
download | lombok-e1ee1b7d2db1ea998aa4d6aa3f6b4141315a9496.tar.gz lombok-e1ee1b7d2db1ea998aa4d6aa3f6b4141315a9496.tar.bz2 lombok-e1ee1b7d2db1ea998aa4d6aa3f6b4141315a9496.zip |
null checks are no longer generated if you put @NonNull on primitives.
Diffstat (limited to 'src/lombok/core')
-rw-r--r-- | src/lombok/core/TransformationsUtil.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lombok/core/TransformationsUtil.java b/src/lombok/core/TransformationsUtil.java index 12b90d0e..5b7400a3 100644 --- a/src/lombok/core/TransformationsUtil.java +++ b/src/lombok/core/TransformationsUtil.java @@ -27,6 +27,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.regex.Pattern; /** * Container for static utility methods useful for some of the standard lombok transformations, regardless of @@ -79,6 +80,12 @@ public class TransformationsUtil { return buildName(prefix, fieldName.toString()); } + public static final Pattern PRIMITIVE_TYPE_NAME_PATTERN = Pattern.compile( + "^(boolean|byte|short|int|long|float|double|char)$"); + + public static final Pattern NON_NULL_PATTERN = Pattern.compile("^no[tn]null$", Pattern.CASE_INSENSITIVE); + public static final Pattern NULLABLE_PATTERN = Pattern.compile("^nullable$", Pattern.CASE_INSENSITIVE); + /** * Generates a getter name from a given field name. * |