ElementTypeDefinition.VARIABLE_REF.is(type)) {
result = new IdentifierElementTypeImpl(this, parent, createId(), def);
} else if (ElementTypeDefinition.EXEC_VARIABLE.is(type)) {
result = new ExecVariableElementTypeImpl(this, parent, createId(), def);
} else {
throw new ElementTypeDefinitionException("Could not resolve element definition '" + type + "'");
}
if (result instanceof LeafElementType)
leafElementTypes.add((LeafElementType) result); else
complexElementTypes.add(result);