PsiElement (ASTNode node) { IElementType type = node.getElementType(); if (type == BOOL_KEY) { return new NativeDefinitionsBoolKeyImpl(node); } else if (type == BOOL_VALUE) { return new NativeDefinitionsBoolValueImpl(node); } else if (type == CODE) { return new NativeDefinitionsCodeImpl(node); } else if (type == STRINGS_KEY) { return new NativeDefinitionsStringsKeyImpl(node); } else if (type == STRINGS_VALUE) { return new NativeDefinitionsStringsValueImpl(node); } else if (type == STRING_KEY) { return new NativeDefinitionsStringKeyImpl(node); } else if (type == STRING_VALUE) { return new NativeDefinitionsStringValueImpl(node); } throw new AssertionError("Unknown element type: " + type); }