Returns a new Reflecter instance

@param target
@return
485486
@SuppressWarnings("unchecked") public static <T> Reflecter<T> from(T target) {
		return Decisions.isClass().apply(target) 
		        ? (((Class<T>) target).isArray() 
		                ? (Reflecter<T>) from(ObjectArrays.newArray(((Class<T>) target).getComponentType(), 0)) 
		                        : from((Class<T>) target)) : new Reflecter<T>(target);
	}
1113456
public <V> Reflecter<T> populate(Map<String, V> properties) {
		return populate(properties, new String[]{});
	}
943513
public static <T> T createProxy(T target, Class<? extends Aspect> aspectClass){
		return createProxy(target, ReflectUtil.newInstance(aspectClass));
	}
743650
public static <T> Level0ArrayOperator<Calendar[],Calendar> on(final Calendar[] target) {
        return onArrayOf(Types.CALENDAR, target);
    }
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());
                }
            }
        }
311563
public static <T> Level0IndefiniteArrayOperator<T[],T> onArray(final T[] target) {
        return new Level0IndefiniteArrayOperator<T[],T>(ExecutionTarget.forOp(target, Normalisation.NONE));
    }
707759
public Object createTargetObject(TargetServiceFactory targetServiceFactory) {
		Debug.logVerbose("[JdonFramework] now getTargetObject by visitor ", module);
		Object targetObjRef = null;
		try {
			TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest();
			TargetMetaDef targetMetaDef = targetMetaRequest.getTargetMetaDef();
			if (targetMetaDef.isEJB()) { // cache the ejb object
				ComponentVisitor cm = targetMetaRequest.getComponentVisitor();
				targetMetaRequest.setVisitableName(ComponentKeys.TARGETSERVICE_FACTORY);
				Debug.logVerbose(ComponentKeys.TARGETSERVICE_FACTORY + " in action (cache)", module);
				targetObjRef = cm.visit();
			} else {
				Debug.logVerbose("[JdonFramework] not active targer service instance cache !!!!", module);
				targetObjRef = targetServiceFactory.create();
			}
		} catch (Exception e) {
			Debug.logError("[JdonFramework]createTargetObject error: " + e, module);
		}
		return targetObjRef;
	}
1327810
public Reflecter<T> exchange(String targetFieldName, String keyFromPropMap) {
		exchangeProps.put(targetFieldName, keyFromPropMap);
		return this;
	}
932333
public RequestTemplate target(String target) {
    /* target can be empty */
    if (Util.isBlank(target)) {
      return this;
    }

    /* verify that the target contains the scheme, host and port */
    if (!UriUtils.isAbsolute(target)) {
      throw new IllegalArgumentException("target values must be absolute.");
    }
    if (target.endsWith("/")) {
      target = target.substring(0, target.length() - 1);
    }
    try {
      /* parse the target */
      URI targetUri = URI.create(target);

      if (Util.isNotBlank(targetUri.getRawQuery())) {
        /*
         * target has a query string, we need to make sure that they are recorded as queries
         */
        this.extractQueryTemplates(targetUri.getRawQuery(), true);
      }

      /* strip the query string */
      this.target = targetUri.getScheme() + "://" + targetUri.getAuthority() + targetUri.getPath();
      if (targetUri.getFragment() != null) {
        this.fragment = "#" + targetUri.getFragment();
      }
    } catch (IllegalArgumentException iae) {
      /* the uri provided is not a valid one, we can't continue */
      throw new IllegalArgumentException("Target is not a valid URI.", iae);
    }
    return this;
  }
810672
public <V> Reflecter<T> populate(String json, String... excludes) {
	    return JSONer.addJsonExchangeFunc(this).populate(JSONer.readNoneNullMap(json), excludes);
	}
332961
public <T> DynamicJdbcMapper<T> newMapper(final Class<T> target) {
		return newMapper((Type) target);
	}
501751
public static <T> Level0ArrayOperator<Double[],Double> on(final double[] target) {
        return onArrayOf(Types.DOUBLE, ArrayUtils.toObject(target));
    }
727968
private static Reflect on(Constructor<?> constructor, Object... args) throws ReflectException {
        try {
            return on(constructor.getDeclaringClass(), accessible(constructor).newInstance(args));
        }
        catch (Exception e) {
            throw new ReflectException(e);
        }
    }
653536
public <T> DynamicJdbcMapper<T> newMapper(final Type target) {
		final ClassMeta<T> classMeta = getClassMeta(target);
		return new DynamicJdbcSetRowMapper<T>(new SetRowMapperFactory<T>(classMeta),  new MapperKeyFactory(),  new MapperKeyFactory());
	}
850315
public Reflector create(Object... args) throws ReflectException {
        Class<?>[] types = getTypes(args);

        try {
            Constructor<?> constructor = type().getDeclaredConstructor(types);
            return with(constructor, args);
        } catch (NoSuchMethodException e) {
            for (Constructor<?> constructor : type().getDeclaredConstructors()) {
                if (match(constructor.getParameterTypes(), types)) {
                    return with(constructor, args);
                }
            }

            throw new ReflectException(e);
        }
    }
322854
public static <TARGET> Implementing<TARGET> implementing(Class<TARGET> targetType) {
        return new Implementing<>(TypeUtils.wrap(targetType));
    }
384127
public static <T> T proxy(T target, Aspect aspect){
		return ProxyFactory.createProxy(target, aspect);
	}