public static TypeDeclarationNode namedType ( Iterable < String > segments ) { Iterator < String > segmentsIt = segments . iterator ( ) ; Node node = IR . name ( segmentsIt . next ( ) ) ; while ( segmentsIt . hasNext ( ) ) { node = IR . getprop ( node , IR . string ( segmentsIt . next ( ) ) ) ; } return new TypeDeclarationNode ( Token . NAMED_TYPE , node ) ; }
Produces a tree structure similar to the Rhino AST of a qualified name expression under a top - level NAMED_TYPE node .