//generated by abstract-syntax-gen package de.peeeq.wurstscript.ast; import java.util.*; @SuppressWarnings({"cast", "unused", "rawtypes"}) public class Ast { public static Identifier Identifier(de.peeeq.wurstscript.parser.WPos source, String name) { return new IdentifierImpl(source, name); } public static CompilationUnit CompilationUnit(de.peeeq.wurstscript.attributes.CompilationUnitInfo cuInfo, JassToplevelDeclarations jassDecls, WPackages packages) { return new CompilationUnitImpl(cuInfo, jassDecls, packages); } public static WPackage WPackage(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, WImports imports, WEntities elements) { return new WPackageImpl(source, modifiers, nameId, imports, elements); } public static WImport WImport(de.peeeq.wurstscript.parser.WPos source, boolean isPublic, boolean isInitLater, Identifier packagenameId) { return new WImportImpl(source, isPublic, isInitLater, packagenameId); } public static ExtensionFuncDef ExtensionFuncDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, TypeExpr extendedType, Identifier nameId, TypeParamDefs typeParameters, WParameters parameters, OptTypeExpr returnTyp, WStatements body) { return new ExtensionFuncDefImpl(source, modifiers, extendedType, nameId, typeParameters, parameters, returnTyp, body); } public static InitBlock InitBlock(de.peeeq.wurstscript.parser.WPos source, WStatements body) { return new InitBlockImpl(source, body); } public static NativeFunc NativeFunc(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, WParameters parameters, OptTypeExpr returnTyp) { return new NativeFuncImpl(source, modifiers, nameId, parameters, returnTyp); } public static ModuleDef ModuleDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, TypeParamDefs typeParameters, ClassDefs innerClasses, FuncDefs methods, GlobalVarDefs vars, ConstructorDefs constructors, ModuleInstanciations p_moduleInstanciations, ModuleUses moduleUses, OnDestroyDef onDestroy) { return new ModuleDefImpl(source, modifiers, nameId, typeParameters, innerClasses, methods, vars, constructors, p_moduleInstanciations, moduleUses, onDestroy); } public static TypeExprSimple TypeExprSimple(de.peeeq.wurstscript.parser.WPos source, OptTypeExpr scopeType, String typeName, TypeExprList typeArgs) { return new TypeExprSimpleImpl(source, scopeType, typeName, typeArgs); } public static TypeExprArray TypeExprArray(de.peeeq.wurstscript.parser.WPos source, TypeExpr base, OptExpr arraySize) { return new TypeExprArrayImpl(source, base, arraySize); } public static TypeExprThis TypeExprThis(de.peeeq.wurstscript.parser.WPos source, OptTypeExpr scopeType) { return new TypeExprThisImpl(source, scopeType); } public static TypeExprResolved TypeExprResolved(de.peeeq.wurstscript.parser.WPos source, de.peeeq.wurstscript.types.WurstType resolvedType) { return new TypeExprResolvedImpl(source, resolvedType); } public static NoTypeExpr NoTypeExpr() { return new NoTypeExprImpl(); } public static NoExpr NoExpr() { return new NoExprImpl(); } public static NativeType NativeType(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, OptTypeExpr optTyp) { return new NativeTypeImpl(source, modifiers, nameId, optTyp); } public static ClassDef ClassDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, TypeParamDefs typeParameters, OptTypeExpr extendedClass, TypeExprList implementsList, ClassDefs innerClasses, FuncDefs methods, GlobalVarDefs vars, ConstructorDefs constructors, ModuleInstanciations p_moduleInstanciations, ModuleUses moduleUses, OnDestroyDef onDestroy) { return new ClassDefImpl(source, modifiers, nameId, typeParameters, extendedClass, implementsList, innerClasses, methods, vars, constructors, p_moduleInstanciations, moduleUses, onDestroy); } public static InterfaceDef InterfaceDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, TypeParamDefs typeParameters, TypeExprList extendsList, FuncDefs methods, GlobalVarDefs vars, ConstructorDefs constructors, ModuleInstanciations moduleInstanciations, ModuleUses moduleUses, OnDestroyDef onDestroy) { return new InterfaceDefImpl(source, modifiers, nameId, typeParameters, extendsList, methods, vars, constructors, moduleInstanciations, moduleUses, onDestroy); } public static TupleDef TupleDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, WParameters parameters, OptTypeExpr returnTyp) { return new TupleDefImpl(source, modifiers, nameId, parameters, returnTyp); } public static EnumDef EnumDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, EnumMembers members) { return new EnumDefImpl(source, modifiers, nameId, members); } public static SwitchCase SwitchCase(de.peeeq.wurstscript.parser.WPos source, ExprList expressions, WStatements stmts) { return new SwitchCaseImpl(source, expressions, stmts); } public static SwitchDefaultCaseStatements SwitchDefaultCaseStatements(de.peeeq.wurstscript.parser.WPos source, WStatements stmts) { return new SwitchDefaultCaseStatementsImpl(source, stmts); } public static NoDefaultCase NoDefaultCase() { return new NoDefaultCaseImpl(); } public static ConstructorDef ConstructorDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, WParameters parameters, SuperConstructorCall superConstructorCall, WStatements body) { return new ConstructorDefImpl(source, modifiers, parameters, superConstructorCall, body); } public static OnDestroyDef OnDestroyDef(de.peeeq.wurstscript.parser.WPos source, WStatements body) { return new OnDestroyDefImpl(source, body); } public static ModuleUse ModuleUse(de.peeeq.wurstscript.parser.WPos source, Identifier moduleNameId, TypeExprList typeArgs) { return new ModuleUseImpl(source, moduleNameId, typeArgs); } public static ModuleInstanciation ModuleInstanciation(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, ClassDefs innerClasses, FuncDefs methods, GlobalVarDefs vars, ConstructorDefs constructors, ModuleInstanciations p_moduleInstanciations, ModuleUses moduleUses, OnDestroyDef onDestroy) { return new ModuleInstanciationImpl(source, modifiers, nameId, innerClasses, methods, vars, constructors, p_moduleInstanciations, moduleUses, onDestroy); } public static EnumMember EnumMember(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId) { return new EnumMemberImpl(source, modifiers, nameId); } public static SomeSuperConstructorCall SomeSuperConstructorCall(de.peeeq.wurstscript.parser.WPos source, de.peeeq.wurstscript.parser.WPos keywordSource, Arguments superArgs) { return new SomeSuperConstructorCallImpl(source, keywordSource, superArgs); } public static NoSuperConstructorCall NoSuperConstructorCall() { return new NoSuperConstructorCallImpl(); } public static GlobalVarDef GlobalVarDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, OptTypeExpr optTyp, Identifier nameId, VarInitialization initialExpr) { return new GlobalVarDefImpl(source, modifiers, optTyp, nameId, initialExpr); } public static LocalVarDef LocalVarDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, OptTypeExpr optTyp, Identifier nameId, VarInitialization initialExpr) { return new LocalVarDefImpl(source, modifiers, optTyp, nameId, initialExpr); } public static ArrayInitializer ArrayInitializer(de.peeeq.wurstscript.parser.WPos source, ExprList values) { return new ArrayInitializerImpl(source, values); } public static FuncDef FuncDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, TypeParamDefs typeParameters, WParameters parameters, OptTypeExpr returnTyp, WStatements body) { return new FuncDefImpl(source, modifiers, nameId, typeParameters, parameters, returnTyp, body); } public static TypeParamDef TypeParamDef(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, Identifier nameId, TypeParamConstraints typeParamConstraints) { return new TypeParamDefImpl(source, modifiers, nameId, typeParamConstraints); } public static NoTypeParamConstraints NoTypeParamConstraints() { return new NoTypeParamConstraintsImpl(); } public static WParameter WParameter(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, TypeExpr typ, Identifier nameId) { return new WParameterImpl(source, modifiers, typ, nameId); } public static WShortParameter WShortParameter(de.peeeq.wurstscript.parser.WPos source, Modifiers modifiers, OptTypeExpr typOpt, Identifier nameId) { return new WShortParameterImpl(source, modifiers, typOpt, nameId); } public static EndFunctionStatement EndFunctionStatement(de.peeeq.wurstscript.parser.WPos source) { return new EndFunctionStatementImpl(source); } public static StartFunctionStatement StartFunctionStatement(de.peeeq.wurstscript.parser.WPos source) { return new StartFunctionStatementImpl(source); } public static StmtSkip StmtSkip(de.peeeq.wurstscript.parser.WPos source) { return new StmtSkipImpl(source); } public static StmtSet StmtSet(de.peeeq.wurstscript.parser.WPos source, LExpr updatedExpr, Expr right) { return new StmtSetImpl(source, updatedExpr, right); } public static StmtErr StmtErr(de.peeeq.wurstscript.parser.WPos source) { return new StmtErrImpl(source); } public static StmtReturn StmtReturn(de.peeeq.wurstscript.parser.WPos source, OptExpr returnedObj) { return new StmtReturnImpl(source, returnedObj); } public static StmtExitwhen StmtExitwhen(de.peeeq.wurstscript.parser.WPos source, Expr cond) { return new StmtExitwhenImpl(source, cond); } public static StmtIf StmtIf(de.peeeq.wurstscript.parser.WPos source, Expr cond, WStatements thenBlock, WStatements elseBlock, boolean hasElse) { return new StmtIfImpl(source, cond, thenBlock, elseBlock, hasElse); } public static SwitchStmt SwitchStmt(de.peeeq.wurstscript.parser.WPos source, Expr expr, SwitchCases cases, SwitchDefaultCase switchDefault) { return new SwitchStmtImpl(source, expr, cases, switchDefault); } public static WBlock WBlock(de.peeeq.wurstscript.parser.WPos source, WStatements body) { return new WBlockImpl(source, body); } public static StmtWhile StmtWhile(de.peeeq.wurstscript.parser.WPos source, Expr cond, WStatements body) { return new StmtWhileImpl(source, cond, body); } public static StmtLoop StmtLoop(de.peeeq.wurstscript.parser.WPos source, WStatements body) { return new StmtLoopImpl(source, body); } public static StmtForIn StmtForIn(de.peeeq.wurstscript.parser.WPos source, LocalVarDef loopVar, Expr in, WStatements body) { return new StmtForInImpl(source, loopVar, in, body); } public static StmtForFrom StmtForFrom(de.peeeq.wurstscript.parser.WPos source, LocalVarDef loopVar, Expr in, WStatements body) { return new StmtForFromImpl(source, loopVar, in, body); } public static StmtForRangeUp StmtForRangeUp(de.peeeq.wurstscript.parser.WPos source, LocalVarDef loopVar, Expr to, Expr step, WStatements body) { return new StmtForRangeUpImpl(source, loopVar, to, step, body); } public static StmtForRangeDown StmtForRangeDown(de.peeeq.wurstscript.parser.WPos source, LocalVarDef loopVar, Expr to, Expr step, WStatements body) { return new StmtForRangeDownImpl(source, loopVar, to, step, body); } public static ExprBinary ExprBinary(de.peeeq.wurstscript.parser.WPos source, Expr left, de.peeeq.wurstscript.WurstOperator op, Expr right) { return new ExprBinaryImpl(source, left, op, right); } public static ExprUnary ExprUnary(de.peeeq.wurstscript.parser.WPos source, de.peeeq.wurstscript.WurstOperator opU, Expr right) { return new ExprUnaryImpl(source, opU, right); } public static ExprFunctionCall ExprFunctionCall(de.peeeq.wurstscript.parser.WPos source, Identifier funcNameId, TypeExprList typeArgs, Arguments args) { return new ExprFunctionCallImpl(source, funcNameId, typeArgs, args); } public static ExprNewObject ExprNewObject(de.peeeq.wurstscript.parser.WPos source, Identifier typeNameId, TypeExprList typeArgs, Arguments args) { return new ExprNewObjectImpl(source, typeNameId, typeArgs, args); } public static ExprCast ExprCast(de.peeeq.wurstscript.parser.WPos source, TypeExpr typ, Expr expr) { return new ExprCastImpl(source, typ, expr); } public static ExprInstanceOf ExprInstanceOf(de.peeeq.wurstscript.parser.WPos source, TypeExpr typ, Expr expr) { return new ExprInstanceOfImpl(source, typ, expr); } public static ExprClosure ExprClosure(de.peeeq.wurstscript.parser.WPos source, de.peeeq.wurstscript.parser.WPos arrowSource, WShortParameters shortParameters, Expr implementation) { return new ExprClosureImpl(source, arrowSource, shortParameters, implementation); } public static ExprIncomplete ExprIncomplete(de.peeeq.wurstscript.parser.WPos source, String errorMessage) { return new ExprIncompleteImpl(source, errorMessage); } public static ExprStatementsBlock ExprStatementsBlock(de.peeeq.wurstscript.parser.WPos source, WStatements body) { return new ExprStatementsBlockImpl(source, body); } public static ExprDestroy ExprDestroy(de.peeeq.wurstscript.parser.WPos source, Expr destroyedObj) { return new ExprDestroyImpl(source, destroyedObj); } public static ExprIfElse ExprIfElse(de.peeeq.wurstscript.parser.WPos source, Expr cond, Expr ifTrue, Expr ifFalse) { return new ExprIfElseImpl(source, cond, ifTrue, ifFalse); } public static ExprTypeId ExprTypeId(de.peeeq.wurstscript.parser.WPos source, Expr left) { return new ExprTypeIdImpl(source, left); } public static ExprMemberVarDot ExprMemberVarDot(de.peeeq.wurstscript.parser.WPos source, Expr left, Identifier varNameId) { return new ExprMemberVarDotImpl(source, left, varNameId); } public static ExprMemberVarDotDot ExprMemberVarDotDot(de.peeeq.wurstscript.parser.WPos source, Expr left, Identifier varNameId) { return new ExprMemberVarDotDotImpl(source, left, varNameId); } public static ExprMemberArrayVarDot ExprMemberArrayVarDot(de.peeeq.wurstscript.parser.WPos source, Expr left, Identifier varNameId, Indexes indexes) { return new ExprMemberArrayVarDotImpl(source, left, varNameId, indexes); } public static ExprMemberArrayVarDotDot ExprMemberArrayVarDotDot(de.peeeq.wurstscript.parser.WPos source, Expr left, Identifier varNameId, Indexes indexes) { return new ExprMemberArrayVarDotDotImpl(source, left, varNameId, indexes); } public static ExprMemberMethodDot ExprMemberMethodDot(de.peeeq.wurstscript.parser.WPos source, Expr left, Identifier funcNameId, TypeExprList typeArgs, Arguments args) { return new ExprMemberMethodDotImpl(source, left, funcNameId, typeArgs, args); } public static ExprMemberMethodDotDot ExprMemberMethodDotDot(de.peeeq.wurstscript.parser.WPos source, Expr left, Identifier funcNameId, TypeExprList typeArgs, Arguments args) { return new ExprMemberMethodDotDotImpl(source, left, funcNameId, typeArgs, args); } public static ExprIntVal ExprIntVal(de.peeeq.wurstscript.parser.WPos source, String valIraw) { return new ExprIntValImpl(source, valIraw); } public static ExprRealVal ExprRealVal(de.peeeq.wurstscript.parser.WPos source, String valR) { return new ExprRealValImpl(source, valR); } public static ExprStringVal ExprStringVal(de.peeeq.wurstscript.parser.WPos source, String valS) { return new ExprStringValImpl(source, valS); } public static ExprBoolVal ExprBoolVal(de.peeeq.wurstscript.parser.WPos source, boolean valB) { return new ExprBoolValImpl(source, valB); } public static ExprFuncRef ExprFuncRef(de.peeeq.wurstscript.parser.WPos source, String scopeName, Identifier funcNameId) { return new ExprFuncRefImpl(source, scopeName, funcNameId); } public static ExprVarAccess ExprVarAccess(de.peeeq.wurstscript.parser.WPos source, Identifier varNameId) { return new ExprVarAccessImpl(source, varNameId); } public static ExprVarArrayAccess ExprVarArrayAccess(de.peeeq.wurstscript.parser.WPos source, Identifier varNameId, Indexes indexes) { return new ExprVarArrayAccessImpl(source, varNameId, indexes); } public static ExprThis ExprThis(de.peeeq.wurstscript.parser.WPos source) { return new ExprThisImpl(source); } public static ExprNull ExprNull(de.peeeq.wurstscript.parser.WPos source) { return new ExprNullImpl(source); } public static ExprSuper ExprSuper(de.peeeq.wurstscript.parser.WPos source) { return new ExprSuperImpl(source); } public static ExprEmpty ExprEmpty(de.peeeq.wurstscript.parser.WPos source) { return new ExprEmptyImpl(source); } public static IdentifierWithTypeArgs IdentifierWithTypeArgs(de.peeeq.wurstscript.parser.WPos source, Identifier nameId, TypeExprList typeArgs) { return new IdentifierWithTypeArgsImpl(source, nameId, typeArgs); } public static IdentifierWithTypeParamDefs IdentifierWithTypeParamDefs(de.peeeq.wurstscript.parser.WPos source, Identifier nameId, TypeParamDefs typeParams) { return new IdentifierWithTypeParamDefsImpl(source, nameId, typeParams); } public static VisibilityPublic VisibilityPublic(de.peeeq.wurstscript.parser.WPos source) { return new VisibilityPublicImpl(source); } public static VisibilityPrivate VisibilityPrivate(de.peeeq.wurstscript.parser.WPos source) { return new VisibilityPrivateImpl(source); } public static VisibilityPublicread VisibilityPublicread(de.peeeq.wurstscript.parser.WPos source) { return new VisibilityPublicreadImpl(source); } public static VisibilityProtected VisibilityProtected(de.peeeq.wurstscript.parser.WPos source) { return new VisibilityProtectedImpl(source); } public static VisibilityDefault VisibilityDefault(de.peeeq.wurstscript.parser.WPos source) { return new VisibilityDefaultImpl(source); } public static Annotation Annotation(de.peeeq.wurstscript.parser.WPos source, Identifier funcNameId, Arguments args) { return new AnnotationImpl(source, funcNameId, args); } public static ModStatic ModStatic(de.peeeq.wurstscript.parser.WPos source) { return new ModStaticImpl(source); } public static ModOverride ModOverride(de.peeeq.wurstscript.parser.WPos source) { return new ModOverrideImpl(source); } public static ModAbstract ModAbstract(de.peeeq.wurstscript.parser.WPos source) { return new ModAbstractImpl(source); } public static ModConstant ModConstant(de.peeeq.wurstscript.parser.WPos source) { return new ModConstantImpl(source); } public static WurstDoc WurstDoc(de.peeeq.wurstscript.parser.WPos source, String rawComment) { return new WurstDocImpl(source, rawComment); } public static ModVararg ModVararg(de.peeeq.wurstscript.parser.WPos source) { return new ModVarargImpl(source); } public static WurstModel WurstModel(CompilationUnit ... elements ) { WurstModel l = new WurstModelImpl(); l.addAll(Arrays.asList(elements)); return l; } public static WurstModel WurstModel(Iterable elements ) { WurstModel l = new WurstModelImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (CompilationUnit elem : elements) l.add(elem); return l; } public static JassToplevelDeclarations JassToplevelDeclarations(JassToplevelDeclaration ... elements ) { JassToplevelDeclarations l = new JassToplevelDeclarationsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassToplevelDeclarations JassToplevelDeclarations(Iterable elements ) { JassToplevelDeclarations l = new JassToplevelDeclarationsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (JassToplevelDeclaration elem : elements) l.add(elem); return l; } public static WPackages WPackages(WPackage ... elements ) { WPackages l = new WPackagesImpl(); l.addAll(Arrays.asList(elements)); return l; } public static WPackages WPackages(Iterable elements ) { WPackages l = new WPackagesImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (WPackage elem : elements) l.add(elem); return l; } public static TopLevelDeclarations TopLevelDeclarations(TopLevelDeclaration ... elements ) { TopLevelDeclarations l = new TopLevelDeclarationsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static TopLevelDeclarations TopLevelDeclarations(Iterable elements ) { TopLevelDeclarations l = new TopLevelDeclarationsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (TopLevelDeclaration elem : elements) l.add(elem); return l; } public static WImports WImports(WImport ... elements ) { WImports l = new WImportsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static WImports WImports(Iterable elements ) { WImports l = new WImportsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (WImport elem : elements) l.add(elem); return l; } public static WEntities WEntities(WEntity ... elements ) { WEntities l = new WEntitiesImpl(); l.addAll(Arrays.asList(elements)); return l; } public static WEntities WEntities(Iterable elements ) { WEntities l = new WEntitiesImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (WEntity elem : elements) l.add(elem); return l; } public static ClassDefs ClassDefs(ClassDef ... elements ) { ClassDefs l = new ClassDefsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static ClassDefs ClassDefs(Iterable elements ) { ClassDefs l = new ClassDefsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (ClassDef elem : elements) l.add(elem); return l; } public static EnumMembers EnumMembers(EnumMember ... elements ) { EnumMembers l = new EnumMembersImpl(); l.addAll(Arrays.asList(elements)); return l; } public static EnumMembers EnumMembers(Iterable elements ) { EnumMembers l = new EnumMembersImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (EnumMember elem : elements) l.add(elem); return l; } public static FuncDefs FuncDefs(FuncDef ... elements ) { FuncDefs l = new FuncDefsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static FuncDefs FuncDefs(Iterable elements ) { FuncDefs l = new FuncDefsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (FuncDef elem : elements) l.add(elem); return l; } public static GlobalVarDefs GlobalVarDefs(GlobalVarDef ... elements ) { GlobalVarDefs l = new GlobalVarDefsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static GlobalVarDefs GlobalVarDefs(Iterable elements ) { GlobalVarDefs l = new GlobalVarDefsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (GlobalVarDef elem : elements) l.add(elem); return l; } public static ConstructorDefs ConstructorDefs(ConstructorDef ... elements ) { ConstructorDefs l = new ConstructorDefsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static ConstructorDefs ConstructorDefs(Iterable elements ) { ConstructorDefs l = new ConstructorDefsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (ConstructorDef elem : elements) l.add(elem); return l; } public static ModuleInstanciations ModuleInstanciations(ModuleInstanciation ... elements ) { ModuleInstanciations l = new ModuleInstanciationsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static ModuleInstanciations ModuleInstanciations(Iterable elements ) { ModuleInstanciations l = new ModuleInstanciationsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (ModuleInstanciation elem : elements) l.add(elem); return l; } public static ModuleUses ModuleUses(ModuleUse ... elements ) { ModuleUses l = new ModuleUsesImpl(); l.addAll(Arrays.asList(elements)); return l; } public static ModuleUses ModuleUses(Iterable elements ) { ModuleUses l = new ModuleUsesImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (ModuleUse elem : elements) l.add(elem); return l; } public static TypeExprList TypeExprList(TypeExpr ... elements ) { TypeExprList l = new TypeExprListImpl(); l.addAll(Arrays.asList(elements)); return l; } public static TypeExprList TypeExprList(Iterable elements ) { TypeExprList l = new TypeExprListImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (TypeExpr elem : elements) l.add(elem); return l; } public static SwitchCases SwitchCases(SwitchCase ... elements ) { SwitchCases l = new SwitchCasesImpl(); l.addAll(Arrays.asList(elements)); return l; } public static SwitchCases SwitchCases(Iterable elements ) { SwitchCases l = new SwitchCasesImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (SwitchCase elem : elements) l.add(elem); return l; } public static ArraySizes ArraySizes(Expr ... elements ) { ArraySizes l = new ArraySizesImpl(); l.addAll(Arrays.asList(elements)); return l; } public static ArraySizes ArraySizes(Iterable elements ) { ArraySizes l = new ArraySizesImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (Expr elem : elements) l.add(elem); return l; } public static TypeParamDefs TypeParamDefs(TypeParamDef ... elements ) { TypeParamDefs l = new TypeParamDefsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static TypeParamDefs TypeParamDefs(Iterable elements ) { TypeParamDefs l = new TypeParamDefsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (TypeParamDef elem : elements) l.add(elem); return l; } public static WParameters WParameters(WParameter ... elements ) { WParameters l = new WParametersImpl(); l.addAll(Arrays.asList(elements)); return l; } public static WParameters WParameters(Iterable elements ) { WParameters l = new WParametersImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (WParameter elem : elements) l.add(elem); return l; } public static WShortParameters WShortParameters(WShortParameter ... elements ) { WShortParameters l = new WShortParametersImpl(); l.addAll(Arrays.asList(elements)); return l; } public static WShortParameters WShortParameters(Iterable elements ) { WShortParameters l = new WShortParametersImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (WShortParameter elem : elements) l.add(elem); return l; } public static WStatements WStatements(WStatement ... elements ) { WStatements l = new WStatementsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static WStatements WStatements(Iterable elements ) { WStatements l = new WStatementsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (WStatement elem : elements) l.add(elem); return l; } public static Indexes Indexes(Expr ... elements ) { Indexes l = new IndexesImpl(); l.addAll(Arrays.asList(elements)); return l; } public static Indexes Indexes(Iterable elements ) { Indexes l = new IndexesImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (Expr elem : elements) l.add(elem); return l; } public static Arguments Arguments(Expr ... elements ) { Arguments l = new ArgumentsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static Arguments Arguments(Iterable elements ) { Arguments l = new ArgumentsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (Expr elem : elements) l.add(elem); return l; } public static ExprList ExprList(Expr ... elements ) { ExprList l = new ExprListImpl(); l.addAll(Arrays.asList(elements)); return l; } public static ExprList ExprList(Iterable elements ) { ExprList l = new ExprListImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (Expr elem : elements) l.add(elem); return l; } public static Modifiers Modifiers(Modifier ... elements ) { Modifiers l = new ModifiersImpl(); l.addAll(Arrays.asList(elements)); return l; } public static Modifiers Modifiers(Iterable elements ) { Modifiers l = new ModifiersImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (Modifier elem : elements) l.add(elem); return l; } public static JassGlobalBlock JassGlobalBlock(GlobalVarDef ... elements ) { JassGlobalBlock l = new JassGlobalBlockImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassGlobalBlock JassGlobalBlock(Iterable elements ) { JassGlobalBlock l = new JassGlobalBlockImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (GlobalVarDef elem : elements) l.add(elem); return l; } }