org.antlr.v4.runtime.misc.Nullable Java Examples

The following examples show how to use org.antlr.v4.runtime.misc.Nullable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CharacterEncodingFilter.java    From openemm with GNU Affero General Public License v3.0 5 votes vote down vote up
public void setIsoEncodingDomains(@Nullable String isoEncodingDomainList) {
	iso_8859_1RdirDomains = new CaseInsensitiveSet();
	for (String domain : AgnUtils.splitAndTrimList(isoEncodingDomainList.replace("\n", " ").replace("\r", " ").replace("\t", " "))) {
		if (StringUtils.isNotBlank(domain)) {
			iso_8859_1RdirDomains.add(domain.trim().toLowerCase());
		}
	}
}
 
Example #2
Source File: CharacterEncodingFilter.java    From openemm with GNU Affero General Public License v3.0 5 votes vote down vote up
public void setUtf8EncodingDomains(@Nullable String utf8EncodingDomainList) {
	utf8RdirDomains = new CaseInsensitiveSet();
	for (String domain : AgnUtils.splitAndTrimList(utf8EncodingDomainList.replace("\n", " ").replace("\r", " ").replace("\t", " "))) {
		if (StringUtils.isNotBlank(domain)) {
			utf8RdirDomains.add(domain.trim().toLowerCase());
		}
	}
}
 
Example #3
Source File: CharacterEncodingFilter.java    From openemm with GNU Affero General Public License v3.0 5 votes vote down vote up
public void setJpEncodingDomains(@Nullable String utf8EncodingDomainList) {
	jpRdirDomains = new CaseInsensitiveSet();
	for (String domain : AgnUtils.splitAndTrimList(utf8EncodingDomainList.replace("\n", " ").replace("\r", " ").replace("\t", " "))) {
		if (StringUtils.isNotBlank(domain)) {
			jpRdirDomains.add(domain.trim().toLowerCase());
		}
	}
}
 
Example #4
Source File: DatabaseFieldUtils.java    From openemm with GNU Affero General Public License v3.0 5 votes vote down vote up
@SuppressWarnings("rawtypes")
@Nullable
   public static <T> DatabaseField<T, ? extends Enum> getByCode(final Object code, final DatabaseField<T, ? extends Enum>[] values) {
       return Arrays.stream(values)
               .filter(field -> field.getCode().equals(code))
               .findFirst().orElse(null);
   }
 
Example #5
Source File: DatabaseFieldUtils.java    From openemm with GNU Affero General Public License v3.0 5 votes vote down vote up
@SuppressWarnings("rawtypes")
@Nullable
public static <T> DatabaseField<T, ? extends Enum> getByName(final String readableName, final DatabaseField<T, ? extends Enum>[] values) {
    return Arrays.stream(values)
            .filter(field -> field.getReadableName().equals(readableName))
            .findFirst().orElse(null);
}
 
Example #6
Source File: BindingEntry.java    From openemm with GNU Affero General Public License v3.0 5 votes vote down vote up
@Nullable
public static String getReadableNameByCode(String typeCode){
	Optional<UserType> readableNameOptional = Arrays.stream(UserType.values())
			.filter(recipientType -> recipientType.getTypeCode().equals(typeCode))
			.findFirst();

	return readableNameOptional.isPresent() ? readableNameOptional.get().getReadableName() : null;
}
 
Example #7
Source File: RecipientBindingHistory.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
String getOldValue();
 
Example #8
Source File: ParserUtils.java    From ethereumj with MIT License 4 votes vote down vote up
@Override
public void syntaxError(Recognizer<?, ?> recognizer, @Nullable Object offendingSymbol, int line,
                        int charPositionInLine, String msg, @Nullable RecognitionException e) {
  throw new AntlrParseException(line, charPositionInLine, msg, e);
}
 
Example #9
Source File: FilterErrorListener.java    From alchemy with MIT License 4 votes vote down vote up
@Override
public void reportAttemptingFullContext(@NotNull Parser parser, @NotNull DFA dfa, int i, int i2, @Nullable BitSet bitSet, @NotNull ATNConfigSet atnConfigs) {
    throw new IllegalArgumentException("ambiguity");
}
 
Example #10
Source File: FilterErrorListener.java    From alchemy with MIT License 4 votes vote down vote up
@Override
public void reportAmbiguity(@NotNull Parser parser, @NotNull DFA dfa, int i, int i2, boolean b, @Nullable BitSet bitSet, @NotNull ATNConfigSet atnConfigs) {
    throw new IllegalArgumentException("ambiguity");
}
 
Example #11
Source File: FilterErrorListener.java    From alchemy with MIT License 4 votes vote down vote up
@Override
public void syntaxError(@NotNull Recognizer<?, ?> recognizer, @Nullable Object o, int i, int i2, @NotNull String s, @Nullable RecognitionException e) {
    throw new IllegalArgumentException(e);
}
 
Example #12
Source File: PlainBindingEntry.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
Integer getEntryMailingId();
 
Example #13
Source File: PlainBindingEntry.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
Integer getExitMailingId();
 
Example #14
Source File: PlainBindingEntry.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
String getUserRemark();
 
Example #15
Source File: PlainBindingEntry.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
Integer getUserStatus();
 
Example #16
Source File: PlainBindingEntry.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
String getUserType();
 
Example #17
Source File: PlainBindingEntryHistory.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
String getEmail();
 
Example #18
Source File: PlainBindingEntryHistory.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
String getClientInfo();
 
Example #19
Source File: RecipientBindingHistory.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
String getNewValue();
 
Example #20
Source File: CompositeBindingEntry.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
ComRecipientLiteImpl getRecipient();
 
Example #21
Source File: CompositeBindingEntry.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
Mailinglist getMailingList();
 
Example #22
Source File: DatabaseFieldUtils.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@SuppressWarnings("rawtypes")
@Nullable
public static <T> String getTranslationKeyByCode(final Object code, final DatabaseField<T, ? extends Enum>[] values) {
    DatabaseField<T, ? extends Enum> field = getByCode(code, values);
    return Objects.nonNull(field) ? field.getTranslationKey() : null;
}
 
Example #23
Source File: MailingModel.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
public static String getTranslationKeyByCode(final int code) {
	return DatabaseFieldUtils.getTranslationKeyByCode(code, values());
}
 
Example #24
Source File: MailingModel.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
public static Format getByName(final String readableName) {
	return (Format) DatabaseFieldUtils.getByName(readableName, values());
}
 
Example #25
Source File: MailingModel.java    From openemm with GNU Affero General Public License v3.0 4 votes vote down vote up
@Nullable
public static Format getByCode(final int code) {
	return (Format) DatabaseFieldUtils.getByCode(code, values());
}