@SuppressWarnings("unchecked") private void evaluateProvidedArtefacts() { Object result = GrailsClassUtils.getPropertyOrStaticPropertyOrFieldValue(plugin, PROVIDED_ARTEFACTS); if (result instanceof Collection) { final Collection artefactList = (Collection) result; providedArtefacts = (Class<?>[]) artefactList.toArray(new Class[artefactList.size()]); } }
private void evaluateObservedPlugins() { if (pluginBean.isReadableProperty(PLUGIN_OBSERVE)) { Object observeProperty = GrailsClassUtils.getPropertyOrStaticPropertyOrFieldValue(plugin, PLUGIN_OBSERVE); if (observeProperty instanceof Collection) { Collection observeList = (Collection) observeProperty; observedPlugins = new String[observeList.size()]; int j = 0; for (Object anObserveList : observeList) { String pluginName = anObserveList.toString(); observedPlugins[j++] = pluginName; } } } if (observedPlugins == null) { observedPlugins = new String[0]; } }