예제 #1
0
 @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()]);
   }
 }
예제 #2
0
 @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);
 }
예제 #3
0
 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];
   }
 }