Top Description Constructors Methods
org.antlr.v4.unicode

public abstract Class UnicodeDataTemplateController

extends Object
Class Inheritance
Imports
com.ibm.icu.lang.UCharacter, .UProperty, com.ibm.icu.text.UnicodeSet, com.ibm.icu.util.RangeValueIterator, org.antlr.v4.runtime.misc.Interval, .IntervalSet, java.util.*

StringTemplate controller used to generate parameters to feed to unicodedata.st to code-generate UnicodeData.java, used by the tool for Unicode property escapes like \\p\{Lu\}. Uses ICU to iterate over Unicode character categories, properties, and script codes, as well as aliases for those codes. This class exists in its own Maven module to avoid adding a dependency from the tool onto the (large) ICU runtime.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
private static void
addIntervalForCategory(Map<String, IntervalSet> categoryMap, String categoryName, int start, int finish)

private static void
addIntPropertyAliases(int property, String namePrefix, Map<String, String> propertyAliases)

private static void
addIntPropertyRanges(int property, String namePrefix, Map<String, IntervalSet> propertyCodePointRanges)

private static void
addPropertyAlias(Map<String, String> propertyAliases, String alias, String propertyName)

private static void
addPropertyAliases(Map<String, String> propertyAliases, String propertyName, int property)

private static void
private static void
private static void
private static void
private static void
private static void
private static void
private static void
private static void
private static void
private static List<Integer>
public static Map<String, Object>
private static String
getShortPropertyName(int property)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

UnicodeDataTemplateControllerback to summary
public UnicodeDataTemplateController()

Method Detail

addEmojiPresentationPropertyCodesToCodePointRangesback to summary
private static void addEmojiPresentationPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges)
addIntervalForCategoryback to summary
private static void addIntervalForCategory(Map<String, IntervalSet> categoryMap, String categoryName, int start, int finish)
addIntPropertyAliasesback to summary
private static void addIntPropertyAliases(int property, String namePrefix, Map<String, String> propertyAliases)
addIntPropertyRangesback to summary
private static void addIntPropertyRanges(int property, String namePrefix, Map<String, IntervalSet> propertyCodePointRanges)
addPropertyAliasback to summary
private static void addPropertyAlias(Map<String, String> propertyAliases, String alias, String propertyName)
addPropertyAliasesback to summary
private static void addPropertyAliases(Map<String, String> propertyAliases, String propertyName, int property)
addTR35ExtendedPictographicPropertyCodesToCodePointRangesback to summary
private static void addTR35ExtendedPictographicPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges)
addUnicodeBinaryPropertyCodesToCodePointRangesback to summary
private static void addUnicodeBinaryPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges)
addUnicodeBinaryPropertyCodesToNamesback to summary
private static void addUnicodeBinaryPropertyCodesToNames(Map<String, String> propertyAliases)
addUnicodeBlocksToNamesback to summary
private static void addUnicodeBlocksToNames(Map<String, String> propertyAliases)
addUnicodeCategoryCodesToCodePointRangesback to summary
private static void addUnicodeCategoryCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges)
addUnicodeCategoryCodesToNamesback to summary
private static void addUnicodeCategoryCodesToNames(Map<String, String> propertyAliases)
addUnicodeIntPropertyCodesToCodePointRangesback to summary
private static void addUnicodeIntPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges)
addUnicodeIntPropertyCodesToNamesback to summary
private static void addUnicodeIntPropertyCodesToNames(Map<String, String> propertyAliases)
addUnicodeScriptCodesToNamesback to summary
private static void addUnicodeScriptCodesToNames(Map<String, String> propertyAliases)
addUnicodeSetToIntervalSetback to summary
private static void addUnicodeSetToIntervalSet(UnicodeSet unicodeSet, IntervalSet intervalSet)
convertToRawArrayback to summary
private static List<Integer> convertToRawArray(IntervalSet intervalSet)
getPropertiesback to summary
public static Map<String, Object> getProperties()
getShortPropertyNameback to summary
private static String getShortPropertyName(int property)