Class PythonKeywords
java.lang.Object
io.micronaut.python.processing.util.PythonKeywords
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic StringtoJavaDottedName(String dottedName) AppliestoJavaName(String)to every segment of a dotted name.static StringtoJavaName(String name) The Java identifier behind a Python name: a trailing underscore that shields a keyword is removed.static StringtoPythonName(String name) The name a Java identifier gets in Python: keywords receive a trailing underscore.
-
Method Details
-
isKeyword
- Parameters:
name- A name- Returns:
- Whether it is a Python keyword
-
toPythonName
-
toJavaName
-
toJavaDottedName
AppliestoJavaName(String)to every segment of a dotted name.- Parameters:
dottedName- A package or qualified name in Python form- Returns:
- The Java form
-