List of usage examples for com.google.common.base CharMatcher matchesNoneOf
public boolean matchesNoneOf(CharSequence sequence)
From source file:com.facebook.presto.bytecode.instruction.InvokeInstruction.java
private static void checkUnqualifiedName(String name) { // JVM Specification 4.2.2 Unqualified Names requireNonNull(name, "name is null"); checkArgument(!name.isEmpty(), "name is empty"); if (name.equals("<init>") || name.equals("<clinit>")) { return;//from w w w . j a v a 2s .c o m } CharMatcher invalid = CharMatcher.anyOf(".;[/<>"); checkArgument(invalid.matchesNoneOf(name), "invalid name: %s", name); }
From source file:com.google.template.soy.base.internal.UniqueNameGenerator.java
public UniqueNameGenerator(CharMatcher bannedCharacters, String collisionSeparator) { checkArgument(bannedCharacters.matchesNoneOf(collisionSeparator), "separator %s contains banned characters", collisionSeparator);/*from w w w .j a v a 2s . c o m*/ this.bannedCharacters = bannedCharacters; this.collisionSeparator = collisionSeparator; }