ArrayCreationExpr juggleArrayCreation ( TokenRange range , List < TokenRange > levelRanges , Type type , NodeList < Expression > dimensions , List < NodeList < AnnotationExpr > > arrayAnnotations , ArrayInitializerExpr arrayInitializerExpr ) { NodeList < ArrayCreationLevel > levels = new NodeList <> ( ) ; for ( int i = 0 ; i < arrayAnnotations . size ( ) ; i ++ ) { levels . add ( new ArrayCreationLevel ( levelRanges . get ( i ) , dimensions . get ( i ) , arrayAnnotations . get ( i ) ) ) ; } return new ArrayCreationExpr ( range , type , levels , arrayInitializerExpr ) ; }
Throws together an ArrayCreationExpr from a lot of pieces