<p>
Creates an <i>operation expression</i> on the specified target object.
</p>

@param target the target object on which the expression will execute
@return an operator, ready for chaining
494537
public static <T> Level0ArrayOperator<BigInteger[],BigInteger> onArray(final BigInteger[] target) {
        return onArrayOf(Types.BIG_INTEGER, target);
    }
1060919
public static <T> Level0SetOperator<Set<T>,T> onSet(final Set<T> target) {
        return new Level0SetOperator<Set<T>,T>(ExecutionTarget.forOp(target, Normalisation.SET));
    }
501751
public static <T> Level0ArrayOperator<Double[],Double> on(final double[] target) {
        return onArrayOf(Types.DOUBLE, ArrayUtils.toObject(target));
    }
476115
public static <T> Level0ArrayOperator<Date[],Date> on(final Date[] target) {
        return onArrayOf(Types.DATE, target);
    }
778665
public <T> Predicate<T> in (final Collection<? extends T> target)
    {
        return new Predicate<T>() {
            public boolean apply (T arg) {
                try {
                    return target.contains(arg);
                } catch (NullPointerException e) {
                    return false;
                } catch (ClassCastException e) {
                    return false;
                }
            }
        };
    }
996181
public Operator createOperator(int op, Selector operand)
  {
	Operator operator = new OperatorImpl(op, operand);

	return operator; 
  }
1019231
public static <T> T convertIfNecessary(Object target, Class<T> type) {
        if (type.isInstance(target)) {
            return type.cast(target);
        }

        if (Source.class.isAssignableFrom(type)) {
            if (target.getClass().isAssignableFrom(String.class)) {
                return (T) new StringSource(String.valueOf(target));
            } else if (target.getClass().isAssignableFrom(Node.class)) {
                return (T) new DOMSource((Node) target);
            } else if (target.getClass().isAssignableFrom(InputStreamSource.class)) {
                try {
                    return (T) new StreamSource(((InputStreamSource)target).getInputStream());
                } catch (IOException e) {
                    log.warn("Failed to create stream source from object", e);
                }
            }
        }

        if (MultiValueMap.class.isAssignableFrom(type)) {
            String mapString = String.valueOf(target);

            Properties props = new Properties();
            try {
                props.load(new StringReader(mapString.substring(1, mapString.length() - 1).replaceAll("\\]\\s*", "]\n")));
            } catch (IOException e) {
                throw new CitrusRuntimeException("Failed to reconstruct object of type map", e);
            }
            MultiValueMap<String, Object> map = new LinkedMultiValueMap<>();
            for (Map.Entry<Object, Object> entry : props.entrySet()) {
                String arrayString = String.valueOf(entry.getValue()).replaceAll("^\\[", "").replaceAll("\\]$", "").replaceAll(",\\s", ",");
                map.add(entry.getKey().toString(), StringUtils.commaDelimitedListToStringArray(String.valueOf(arrayString)));
            }

            return (T) map;
        }

        if (Map.class.isAssignableFrom(type)) {
            String mapString = String.valueOf(target);

            Properties props = new Properties();
            try {
                props.load(new StringReader(mapString.substring(1, mapString.length() - 1).replaceAll(",\\s*", "\n")));
            } catch (IOException e) {
                throw new CitrusRuntimeException("Failed to reconstruct object of type map", e);
            }
            Map<String, Object> map = new LinkedHashMap<>();
            for (Map.Entry<Object, Object> entry : props.entrySet()) {
                map.put(entry.getKey().toString(), entry.getValue());
            }

            return (T) map;
        }

        if (String[].class.isAssignableFrom(type)) {
            String arrayString = String.valueOf(target).replaceAll("^\\[", "").replaceAll("\\]$", "").replaceAll(",\\s", ",");
            return (T) StringUtils.commaDelimitedListToStringArray(String.valueOf(arrayString));
        }

        if (List.class.isAssignableFrom(type)) {
            String listString = String.valueOf(target).replaceAll("^\\[", "").replaceAll("\\]$", "").replaceAll(",\\s", ",");
            return (T) Arrays.asList(StringUtils.commaDelimitedListToStringArray(String.valueOf(listString)));
        }

        if (byte[].class.isAssignableFrom(type)) {
            if (target instanceof String) {
                try {
                    return (T) String.valueOf(target).getBytes(Citrus.CITRUS_FILE_ENCODING);
                } catch (UnsupportedEncodingException e) {
                    return (T) String.valueOf(target).getBytes();
                }
            } else if (target instanceof ByteBuffer) {
                return (T) ((ByteBuffer) target).array();
            } else if (target instanceof ByteArrayInputStream) {
                try {
                    return (T) StreamUtils.copyToByteArray((ByteArrayInputStream) target);
                } catch (IOException e) {
                    throw new CitrusRuntimeException("Failed to convert input stream to byte[]");
                }
            }
        }

        if (InputStream.class.isAssignableFrom(type)) {
            if (target instanceof InputStream) {
                return (T) target;
            } else if (target instanceof byte[]) {
                return (T) new ByteArrayInputStream((byte[]) target);
            } else if (target instanceof String) {
                try {
                    return (T) new ByteArrayInputStream(String.valueOf(target).getBytes(Citrus.CITRUS_FILE_ENCODING));
                } catch (UnsupportedEncodingException e) {
                    return (T) new ByteArrayInputStream(String.valueOf(target).getBytes());
                }
            } else {
                try {
                    return (T) new ByteArrayInputStream(target.toString().getBytes(Citrus.CITRUS_FILE_ENCODING));
                } catch (UnsupportedEncodingException e) {
                    return (T) new ByteArrayInputStream(target.toString().getBytes());
                }
            }
        }
377094
public <A extends Collection<? super ResultT>> A into(final A target) {
    forEach(new Block<ResultT>() {
      @Override
      public void apply(@Nonnull final ResultT t) {
        target.add(t);
      }
    });
    return target;
  }
26932
public void ifge(String target) throws IOException
    {
        if (wideIndex)
        {
            out.writeByte(NOT_IFGE);
            out.writeShort(WIDEFIXOFFSET);
            Branch branch = createBranch(target);
            out.writeByte(GOTO_W);
            out.writeInt(branch);
        }
        else
        {
            Branch branch = createBranch(target);
            out.writeOpCode(IFGE);
            out.writeShort(branch);
        }
    }
1366158
@SuppressWarnings("unchecked")
    public static <T> T create(T target) {
        if (target instanceof WestCacheCglib) return target;

        val in = new CglibCacheMethodInterceptor(target);
        return (T) Cglibs.proxy(target.getClass(), in, WestCacheCglib.class);
    }
1310310
public static <T> Operation<T> operation(Class<? extends T> type, Operator operator,
                                             Expression<?>... args) {
        return operation(type, operator, ImmutableList.copyOf(args));
    }
1181678
public static <T> CollectionExpression<Collection<T>, T> collectionOperation(Class<T> elementType, Operator operator,
                                                                  Expression<?>... args) {
        return new CollectionOperation<T>(elementType, operator, args);
    }
1249726
public static <T> Level0ArrayOperator<Byte[],Byte> on(final byte[] target) {
        return onArrayOf(Types.BYTE, ArrayUtils.toObject(target));
    }
571522
@SuppressWarnings("unchecked")
	public <T extends Operator> T geInstance(Opcode opcode) {
		Operator operator = this.operators.get(opcode);
		if (operator == null) {
			throw new TemplateException("Operator |%s| is not implemented.", opcode);
		}
		return (T) operator;
	}
632199
public static OgnlExpression onSingleExpression( String expression, Object... targets )
    {
        List<String> expressions = new ArrayList<String>();
        expressions.add( expression );

        return new OgnlExpression( expressions, targets );
    }
590280
public static <T> Level0ArrayOperator<Integer[],Integer> onArray(final int[] target) {
        return onArrayOf(Types.INTEGER, ArrayUtils.toObject(target));
    }
1220241
public static <T> Level0ListOperator<List<T>,T> onList(final List<T> target) {
        return new Level0ListOperator<List<T>,T>(ExecutionTarget.forOp(target, Normalisation.LIST));
    }