public class ValidationUtil
extends java.lang.Object
Constructor and Description |
---|
ValidationUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isCppKeyword(java.lang.String token) |
static boolean |
isCSharpKeyword(java.lang.String token) |
static boolean |
isGolangKeyword(java.lang.String token) |
static boolean |
isJavaKeyword(java.lang.String token)
Is this token a Java keyword?
|
static boolean |
isSbeCppName(java.lang.String value)
Check value for validity of usage as a C++ identifier.
|
static boolean |
isSbeCSharpName(java.lang.String value)
"Check" value for validity of usage as a csharp identifier.
|
static boolean |
isSbeGolangName(java.lang.String value)
"Check" value for validity of usage as a golang identifier.
|
static boolean |
isSbeJavaName(java.lang.String value)
Check string for validity of usage as a Java identifier.
|
public static boolean isSbeCppName(java.lang.String value)
http://en.cppreference.com/w/cpp/keyword
value
- to checkpublic static boolean isCppKeyword(java.lang.String token)
public static boolean isSbeJavaName(java.lang.String value)
http://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.9
value
- to checkpublic static boolean isJavaKeyword(java.lang.String token)
token
- to be tested.public static boolean isSbeGolangName(java.lang.String value)
identifier = letter { letter | unicode_digit } letter = unicode_letter | "_" .
unicode_letter and unicode_digit are defined in section 4.5 of the the unicode standard at http://www.unicode.org/versions/Unicode8.0.0/ and the Java Character and Digit functions are unicode friendly
value
- to checkpublic static boolean isGolangKeyword(java.lang.String token)
public static boolean isSbeCSharpName(java.lang.String value)
first subsequent* first is { @ | letter | underscore } subsequent is { first | digit | connecing | combining | formatting }*
letter is Lu, Ll, Lt, Lm, Lo, or Nl (possibly escaped) digit is Nd (possibly escaped) connecting is Pc (possibly escaped) combining is Mn or Mc (possibly escaped) formatting is Cf (possibly escaped)
so that all becomes: { @ | _ | Lu | Ll | Lt | Lm | Lo | Nl } { @ | _ | Lu | Ll | Lt | Lm | Lo | Nl | Nd | Pc | Mn | Mc | Cf}*
value
- to checkpublic static boolean isCSharpKeyword(java.lang.String token)
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.