X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=binding%2Fmdsal-binding-java-api-generator%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fbinding%2Fjava%2Fapi%2Fgenerator%2FConstants.java;h=194e73bd4fa2dd8b009a88511918edb2dc3a891c;hb=1144f464d67c5371b30463be5e4e144edaddd05b;hp=0e00bcdb59757c4b70116ac317ac05edc281e819;hpb=d80486297d4a94043f8058207353081320274df1;p=mdsal.git diff --git a/binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/Constants.java b/binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/Constants.java index 0e00bcdb59..194e73bd4f 100644 --- a/binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/Constants.java +++ b/binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/Constants.java @@ -7,32 +7,36 @@ */ package org.opendaylight.mdsal.binding.java.api.generator; +import org.opendaylight.mdsal.binding.model.api.Type; +import org.opendaylight.mdsal.binding.model.util.Types; +import org.opendaylight.yangtools.yang.common.Empty; + /** - * * Various constants when generating JAVA source code. - * */ final class Constants { - public static final String COMMA = ","; public static final String DOT = "."; /** - * Name of the class constant which contains list of Pattern instances. The type of this constant - * is Pattern[] for more than one pattern, or Pattern if there is only a single one. + * Name or prefix (multiple patterns in builder class as composed with '_' and upper case of the field name) + * of the class constant which contains list of Pattern instances. The type of this constant is + * Pattern[] for more than one pattern, or Pattern if there is only a single one. */ public static final String MEMBER_PATTERN_LIST = "patterns"; /** - * Name of the class constant which contains a list of XSD regular expression strings. The type of this constant - * is String[] (or String for single strings) and it corresponds to {@link #MEMBER_PATTERN_LIST} in both size and - * ordering. + * Name or prefix (multiple patterns in builder class as composed with '_' and upper case of the field name) + * of the class constant which contains a list of XSD regular expression strings. The type of this constant is + * String[] (or String for single strings) and it corresponds to {@link #MEMBER_PATTERN_LIST} in both size + * and ordering. */ public static final String MEMBER_REGEX_LIST = "regexes"; - /** - * It doesn't have the sense to create the instances of this class. - */ + // This should live in a common artifact + static final Type EMPTY = Types.typeForClass(Empty.class); + private Constants() { + } }