Class JavaEscapeUtils
java.lang.Object
org.apache.sling.scripting.sightly.java.compiler.JavaEscapeUtils
Deprecated.
The
JavaEscapeUtils
provides useful methods for escaping or transforming invalid Java tokens to valid ones that could be used in
generated Java source code.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isJavaKeyword
(String key) Deprecated.Test whether the argument is a Java keyword.static String
makeJavaIdentifier
(String identifier) Deprecated.Converts the given identifier to a legal Java identifierstatic String
makeJavaPackage
(String scriptName) Deprecated.Converts the given scriptName to a Java package or fully-qualified class namestatic String
mangleChar
(char ch) Deprecated.Mangle the specified character to create a legal Java class name.static char
Deprecated.Provided a mangled string (obtained by callingmangleChar(char)
) it will will return the character that was mangled.
-
Constructor Details
-
JavaEscapeUtils
public JavaEscapeUtils()Deprecated.
-
-
Method Details
-
makeJavaIdentifier
Deprecated.Converts the given identifier to a legal Java identifier- Parameters:
identifier
- the identifier to convert- Returns:
- legal Java identifier corresponding to the given identifier
-
mangleChar
Deprecated.Mangle the specified character to create a legal Java class name.- Parameters:
ch
- the character to mangle- Returns:
- the mangled
-
unmangle
Deprecated.Provided a mangled string (obtained by callingmangleChar(char)
) it will will return the character that was mangled.- Parameters:
mangled
- the mangled string- Returns:
- the original character
-
makeJavaPackage
Deprecated.Converts the given scriptName to a Java package or fully-qualified class name- Parameters:
scriptName
- the scriptName to convert- Returns:
- Java package corresponding to the given scriptName
-
isJavaKeyword
Deprecated.Test whether the argument is a Java keyword.- Parameters:
key
- the String to test- Returns:
true
if the String is a Java keyword,false
otherwise
-
JavaEscapeHelper
for a replacement.