@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()]); } }
@SuppressWarnings("unchecked") private void addExcludeRuleInternal(Map map, Object o) { Collection excludes = (Collection) map.get(EXCLUDES); if (excludes == null) { excludes = new ArrayList(); map.put(EXCLUDES, excludes); } Collection includes = (Collection) map.get(INCLUDES); if (includes != null) includes.remove(o); excludes.add(o); }
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]; } }