This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO try to remove javassist dependency with this class | |
public class Re2jHack | |
{ | |
private static final AtomicBoolean PATCHED = new AtomicBoolean(); | |
private static void addMethodUnicodeIsLetter(final ClassPool cp) throws CannotCompileException, NotFoundException | |
{ | |
final CtClass cc = cp.get("com.google.re2j.Unicode"); | |
cc.addMethod( | |
CtMethod.make("static boolean isLetter(int r) { return is(com.google.re2j.UnicodeTables.L, r); }", cc)); |