use of lucee.runtime.type.UDFCustomType in project Lucee by lucee.
the class ModernApplicationContext method getCustomType.
@Override
public CustomType getCustomType(String strType) {
if (!initCustomTypes) {
if (customTypes == null)
customTypes = new HashMap<String, CustomType>();
// this.type.susi=function(any value){};
Struct sct = Caster.toStruct(get(component, KeyConstants._type, null), null);
if (sct != null) {
Iterator<Entry<Key, Object>> it = sct.entryIterator();
Entry<Key, Object> e;
UDF udf;
while (it.hasNext()) {
e = it.next();
udf = Caster.toFunction(e.getValue(), null);
if (udf != null)
customTypes.put(e.getKey().getLowerString(), new UDFCustomType(udf));
}
}
initCustomTypes = true;
}
return customTypes.get(strType.trim().toLowerCase());
}
Aggregations