api/src/main/java/org/ocpsoft/rewrite/util/ParameterUtils.java
public static Object performRetrieval(final Rewrite event, final EvaluationContext context,
            final Parameter<?> parameter)
   {
      Object result = null;

      List<Binding> bindings = new ArrayList<Binding>(parameter.getBindings());
      Collections.reverse(bindings);
      // FIXME Should not have to worry about order here.

      for (Binding binding : bindings)
      {
         if (result == null && !(binding instanceof Evaluation) && binding.supportsRetrieval())
         {
            result = binding.retrieve(event, context);
         }
      }

      for (Binding binding : bindings)
      {
         if (binding instanceof Evaluation)
         {
            if (((Evaluation) binding).hasValue(event, context))
            {
               result = binding.retrieve(event, context);
            }
         }
      }

      return result;
   }
public static Object performRetrieval(final Rewrite event, final EvaluationContext context,
            final Parameter<?> parameter)
   {
      Object result = null;

      List<Binding> bindings = new ArrayList<Binding>(parameter.getBindings());
      Collections.reverse(bindings);
      // FIXME Should not have to worry about order here.

      for (Binding binding : bindings)
      {
         if (result == null && !(binding instanceof Evaluation) && binding.supportsRetrieval())
         {
            result = binding.retrieve(event, context);
         }
      }

      for (Binding binding : bindings)
      {
         if (binding instanceof Evaluation)
         {
            if (((Evaluation) binding).hasValue(event, context))
            {
               result = binding.retrieve(event, context);
            }
         }
      }

      return result;
   }
public static Object performRetrieval ( final Rewrite event , final EvaluationContext context , final Parameter < ? > parameter ) { Object result = null ; List < Binding > bindings = new ArrayList < Binding > ( parameter . getBindings ( ) ) ; Collections . reverse ( bindings ) ; // FIXME Should not have to worry about order here. for ( Binding binding : bindings ) { if ( result == null && ! ( binding instanceof Evaluation ) && binding . supportsRetrieval ( ) ) { result = binding . retrieve ( event , context ) ; } } for ( Binding binding : bindings ) { if ( binding instanceof Evaluation ) { if ( ( ( Evaluation ) binding ) . hasValue ( event , context ) ) { result = binding . retrieve ( event , context ) ; } } } return result ; }
Extract bound values from configured {@link Parameter} instances. Return a {@link List} of the extracted values.
Extract bound values from configured {