Creates a new n-ary operator with a given type and a list of operands.
@param type     the type of the formula
@param operands the list of operands
@return the newly generated formula
@throws IllegalArgumentException if a wrong formula type is passed
511960
public Formula naryOperator(final FType type, final Collection<? extends Formula> operands) {
    return this.naryOperator(type, operands.toArray(new Formula[0]));
  }
249973
static public BooleanExpression OR(Collection<? extends BooleanExpression> operands){
		BooleanExpression result = new BooleanExpression(OPERATOR_OR);
		result.addOperand(operands);
		return result;
	}
275807
def arithmetic(self, operation, operand1, operand2, operand3 = None):
        
        if isinstance(operand1, int):
            output_type = self.symtab.get_type(operand1)
            self.free_if_register(operand1)
        else:
            output_type = None
        if isinstance(operand2, int):
            output_type = self.symtab.get_type(operand2) if output_type == None else output_type
            self.free_if_register(operand2)
        else:
            output_type = SharedData.TYPES.NO_TYPE if output_type == None else output_type
        #if operand3 is not defined, reserve one free register for it
        output = self.take_register(output_type) if operand3 == None else operand3
        mnemonic = self.arithmetic_mnemonic(operation, output_type)
        self.newline_text("{0}\t{1},{2},{3}".format(mnemonic, self.symbol(operand1), self.symbol(operand2), self.symbol(output)), True)
        return output
389770
public static <T> SimpleOperation<T> operation(Class<? extends T> type, Operator operator,
            Expression<?>... args) {
        return simpleOperation(type, operator, args);

    }
243053
public static PredicateOperation predicate(Operator operator, Expression<?>... args) {
        return predicate(operator, ImmutableList.copyOf(args));
    }
465904
private <K, T extends Persistable<K>> CastorDao<K, T> _createDao(
                    final Class<T> type
                    )
    {
        String  daoClazzName = _typeMapping.get( type.getName() );
        if (_LOG_.isDebugEnabled()) {
            _LOG_.debug( "creating Dao: object type=" + type
                            + ", Dao type=" + daoClazzName );
        }

        CastorDao<K, T>  dao = null;
        if (daoClazzName == null) {
            dao = new CastorDao<K, T>( type );
        } else {
            try {
                @SuppressWarnings( "unchecked" )
                Class<CastorDao<K, T>>  daoClazz =
                    (Class<CastorDao<K, T>>)Class.forName( daoClazzName );
                dao = daoClazz.newInstance();
                               //throws InstantiationException, IllegalAccessException
            } catch (Exception ex) {
                throw new PersistenceException( ex );
            }
        }

        if (CastorDaoSupport.class.isInstance( dao )) {
            CastorDaoSupport  support = CastorDaoSupport.class.cast( dao );
            support.setJDOManager( _jdoManager );
        }

        return dao;
    }
598866
public static ConstructorRef create(TypeInfo type, Iterable<Type> argTypes) {
    return create(
        type, new Method("<init>", Type.VOID_TYPE, Iterables.toArray(argTypes, Type.class)));
  }
202965
public static <T> ArrayConstructorExpression<T> array(Class<T[]> type, Expression<T>... exprs) {
        return new ArrayConstructorExpression<T>(type, exprs);
    }
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 );
    }
1157461
public static ACE newInstance(final AceType type) {
        final ACE ace = new ACE();
        ace.setType(type);
        return ace;
    }
1113613
public ArrayType makeArrayType(Type t) {
        if (t.hasTag(VOID) || t.hasTag(PACKAGE)) {
            Assert.error("Type t must not be a VOID or PACKAGE type, " + t.toString());
        }
        return new ArrayType(t, syms.arrayClass);
    }
291542
public static JsExpr genJsExprUsingSoySyntax(Operator op, List<JsExpr> operandJsExprs) {
    List<Expression> operands =
        Lists.transform(operandJsExprs, input -> fromExpr(input, ImmutableList.<GoogRequire>of()));
    return Expression.operation(op, operands).assertExpr();
  }
834898
public static AGeneralOperation getOperation(OperationType operationType){
		switch(operationType){
			case BASIC_INSTRUCTION:			   return new BasicOperation();			
			case BASIC_CONVERSION:             return new BasicConversion();			
			case OBJECT:					   return new ObjectOperation();			
			case ARRAY: 					   return new ArrayOperation();			
			case ARRAY_LIST:				   return new ArrayListOperation();		
			case LIST_ARRAY:			       return new ListArrayOperation();		
			case ARRAY_WITH_MAPPED_ITEMS:	   return new MappedArrayOperation();		
			case ARRAY_LIST_WITH_MAPPED_ITEMS: return new MappedArrayListOperation();	
			case LIST_ARRAY_WITH_MAPPED_ITEMS: return new MappedListArrayOperation();	
			case COLLECTION: 				   return new CollectionOperation();		
			case COLLECTION_WITH_MAPPED_ITEMS: return new MappedCollectionOperation();	
			case MAP:	     				   return new MapOperation();				
			case MAP_WITH_MAPPED_ITEMS: 	   return new MappedMapOperation();		
			case CONVERSION: 				   return new ConversionOperation();
			case DATE_CALENDAR:				   return new DateCalendarOperation();
			case STRING_ENUM: 				   return new StringEnumOperation();
			case STRING_STRINGBUFFER:		   return new StringStringBufferOperation();
			case STRING_STRINGBUILDER:		   return new StringStringBuilderOperation();
			case CALENDAR_DATE:				   return new CalendarDateOperation();
			case ENUM_STRING:				   return new EnumStringOperation();
			case STRINGBUILDER_STRING:         return new StringBuilderStringOperation();
			case STRINGBUFFER_STRING:		   return new StringBufferStringOperation();
			case ENUM_ENUM: 				   return new EnumEnumOperation();
			default: return null;
		}
		
	}
1005753
public static FunctionalType unaryOperator(TypeMirror type) {
    checkArgument(!type.getKind().isPrimitive(), "Unexpected primitive type %s", type);
    return new FunctionalType(
        QualifiedName.of(UnaryOperator.class).withParameters(type),
        "apply",
        ImmutableList.of(type),
        type);
  }
1112428
public static AlternateTypeRule newRule(Type original, Type alternate) {
    return newRule(original, alternate, Ordered.LOWEST_PRECEDENCE);
  }
153041
public static <T extends Geometry> GeometryExpression<T> geometryOperation(Class<? extends T> type,
                                                                               Operator op, Expression<?>... args) {
        return new GeometryOperation<T>(type, op, args);
    }
748633
public static AggregationUnit create(final AggregationType type) {
        switch (type) {
            case MAX:
                return new ComparableAggregationUnit(false);
            case MIN:
                return new ComparableAggregationUnit(true);
            case SUM:
            case COUNT:
                return new AccumulationAggregationUnit();
            case AVG:
                return new AverageAggregationUnit();
            default:
                throw new UnsupportedOperationException(type.name());
        }
    }