Adds operation parameter with custom parameter type.
@param arg
@param argType
@return
978551
public JmxMessage parameter(Object arg, Class<?> argType) {
        if (mbeanInvocation == null) {
            throw new CitrusRuntimeException("Invalid access to operation parameter for JMX message");
        }

        if (mbeanInvocation.getOperation() == null) {
            throw new CitrusRuntimeException("Invalid access to operation parameter before operation was set for JMX message");
        }

        if (mbeanInvocation.getOperation().getParameter() == null) {
            mbeanInvocation.getOperation().setParameter(new ManagedBeanInvocation.Parameter());
        }

        OperationParam operationParam = new OperationParam();
        operationParam.setValueObject(arg);
        operationParam.setType(argType.getName());
        mbeanInvocation.getOperation().getParameter().getParameter().add(operationParam);
        return this;
    }
884116
function addCommandType(engine, name, Type) {
        engine.commandTypes[name] = Type;
        Type.prototype.type = name;
    }
1144946
public boolean addOptionalParams(JSType ...types) {
    if (hasVarArgs()) {
      return false;
    }

    for (JSType type : types) {
      newParameter(registry.createOptionalType(type)).setOptionalArg(true);
    }
    return true;
  }
942042
public Object createNewInstance(Class type, Object arg)
    {
        if (type != null)
            return createNewInstance(new Class[]{type}, new Object[]{arg});
        else
            return createNewInstance((Class[]) null, (Object[]) null);
    }
170194
public static <T> T callConstructor(Class<T> c, Class<?>[] argTypes, Object[] args) {
        try {
            Constructor<T> cons = c.getConstructor(argTypes);
            return cons.newInstance(args);
        } catch(InvocationTargetException e) {
            throw getCause(e);
        } catch(IllegalAccessException e) {
            throw new IllegalStateException(e);
        } catch(NoSuchMethodException e) {
            throw new IllegalArgumentException(e);
        } catch(InstantiationException e) {
            throw new IllegalArgumentException(e);
        }
    }
694416
public void addArg(FunctionLibFunctionArg arg) {
	arg.setFunction(this);
	argument.add(arg);
	if (arg.getDefaultValue() != null) hasDefaultValues = true;
    }
20097
public static <T extends Comparable<?>> DateOperation<T> dateOperation(Class<? extends T> type,
            Operator operator, Expression<?>... args) {
        return new DateOperation<T>(type, operator, args);
    }
1268090
public T addServerArgument(final String arg) {
        if (arg != null) {
            final Argument argument = Arguments.parse(arg);
            if (addServerArgument(argument)) {
                if (SECURITY_MANAGER_ARG.equals(arg)) {
                    setUseSecurityManager(true);
                } else {
                    serverArgs.add(argument);
                }
            }
        }
        return getThis();
    }
654542
public static TypedArgument typed( Class<?> type, Object value )
    {
        type = Objects.requireNonNull( type, "type" );
        if ( value != null && !type.isInstance( value ) )
        {
            throw new IllegalArgumentException(
                    value + " (a " + value.getClass().getName() + ") is not an instance of " + type.getName() );
        }
        return new TypedArgument( type, value );
    }
109316
@NonNull
    public SourceParams setType(@Source.SourceType String type) {
        mType = type;
        mTypeRaw = type;
        return this;
    }
874597
public <T> T querySingleTypedResult(String sql, String[] args, int column) {
		return db.querySingleTypedResult(sql, args, column);
	}
303888
def arg_type_to_string(arg_type) -> str:
    

    union_params = (
        getattr(arg_type, '__union_params__', None) or
        getattr(arg_type, '__args__', None)
    )

    if union_params and isinstance(union_params, (list, tuple)):
        return ', '.join([arg_type_to_string(item) for item in union_params])

    try:
        return arg_type.__name__
    except AttributeError:
        return '{}'.format(arg_type)
161730
public static Object createInstanceByType(Class<?> type, Object... args) throws Exception {
		if (args.length == 0) {
			Constructor<?> constructor = type.getConstructor();
			return constructor.newInstance();
		} else {
			throw new UnsupportedException(null, "NOT_SUPPORTED", "Constructors with parameters are not supported");
		}
	}
1243317
public static int type(String type)
    {
        if ("request".equalsIgnoreCase(type))
            return __REQUEST;
        if ("forward".equalsIgnoreCase(type))
            return __FORWARD;
        if ("include".equalsIgnoreCase(type))
            return __INCLUDE;
        if ("error".equalsIgnoreCase(type))
            return __ERROR;
        throw new IllegalArgumentException(type);
    }
846376
public CodeElement addSupportingType(String type) {
        CodeElement codeElement = new CodeElement(type);
        codeElement.setRole(CodeElementRole.Supporting);
        this.codeElements.add(codeElement);

        return codeElement;
    }
855710
protected static boolean typeCheckMethodArgumentWithGenerics(ClassNode parameterType, ClassNode argumentType, boolean lastArg) {
        if (UNKNOWN_PARAMETER_TYPE == argumentType) {
            // called with null
            return !isPrimitiveType(parameterType);
        }
        if (!isAssignableTo(argumentType, parameterType) && !lastArg) {
            // incompatible assignment
            return false;
        }
        if (!isAssignableTo(argumentType, parameterType) && lastArg) {
            if (parameterType.isArray()) {
                if (!isAssignableTo(argumentType, parameterType.getComponentType())) {
                    return false;
                }
            } else {
                return false;
            }
        }
        if (parameterType.isUsingGenerics() && argumentType.isUsingGenerics()) {
            GenericsType gt = GenericsUtils.buildWildcardType(parameterType);
            if (!gt.isCompatibleWith(argumentType)) {
                boolean samCoercion = isSAMType(parameterType) && argumentType.equals(CLOSURE_TYPE);
                if (!samCoercion) return false;
            }
        } else if (parameterType.isArray() && argumentType.isArray()) {
            // verify component type
            return typeCheckMethodArgumentWithGenerics(parameterType.getComponentType(), argumentType.getComponentType(), lastArg);
        } else if (lastArg && parameterType.isArray()) {
            // verify component type, but if we reach that point, the only possibility is that the argument is
            // the last one of the call, so we're in the cast of a vargs call
            // (otherwise, we face a type checker bug)
            return typeCheckMethodArgumentWithGenerics(parameterType.getComponentType(), argumentType, lastArg);
        }
        return true;
    }
1288943
public static OpResultInfo invokeOpByName(String name, String opName, String[] argTypes, String[] args)
      throws JMException
   {
      MBeanServer server = getMBeanServer();
      ObjectName objName = new ObjectName(name);
      int length = argTypes != null ? argTypes.length : 0;
      Object[] typedArgs = new Object[length];

      for (int p = 0; p < typedArgs.length; p++)
      {
         String arg = args[p];
         try
         {
            Object argValue = PropertyEditors.convertValue(arg, argTypes[p]);
            typedArgs[p] = argValue;
         }
         catch (ClassNotFoundException e)
         {
            if (trace)
               log.trace("Failed to load class for arg" + p, e);
            throw new ReflectionException(e, "Failed to load class for arg" + p);
         }
         catch (java.beans.IntrospectionException e)
         {
            // If the type is not java.lang.Object throw an exception
            if (!argTypes[p].equals("java.lang.Object"))
               throw new javax.management.IntrospectionException("Failed to find PropertyEditor for type: " +
                                                                 argTypes[p]);
            // Just use the String arg
            typedArgs[p] = arg;
            continue;
         }
      }

      Object opReturn = server.invoke(objName, opName, typedArgs, argTypes);
      return new OpResultInfo(opName, argTypes, args, opReturn);
   }