if (value instanceof String)
{
String key = IDENTITY_TYPE_CACHE_PREFIX + (String) value;
if (cache.containsKey(key)) return (IdentityObjectType) cache.get(key);
IdentityObjectType type = new IdentityObjectTypeImpl((String) value);
cache.put(key, type);
return type;
}
else
{
if (cache.containsKey(value)) return (IdentityObjectType) cache.get(value);
IdentityObjectType type = new IdentityObjectTypeImpl(
(String) identityTypeNameProperty.getValue(value));
cache.put(value, type);
return type;
}
}