public AbstractElementTypeLookupCache(T elementType) {
this.elementType = elementType;
if (!elementType.isLeaf()) {
landmarkTokens = new THashMap<TokenType, Boolean>();
}
WrappingDefinition wrapping = getElementType().getWrapping();
if (wrapping != null) {
TokenType wrappingBeginTokenType = wrapping.getBeginElementType().getTokenType();
TokenType wrappingEndTokenType = wrapping.getEndElementType().getTokenType();
allPossibleTokens.add(wrappingBeginTokenType);
allPossibleTokens.add(wrappingEndTokenType);
firstPossibleTokens.add(wrappingBeginTokenType);
}
}