Advertisement
Guest User

Untitled

a guest
Sep 7th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.53 KB | None | 0 0
  1. res = ctx.normalClassDeclaration.classBody.classBodyDeclaration.asScala
  2.     .filter(d => d.classMemberDeclaration != null)
  3.     .map(_.classMemberDeclaration)
  4.     .filter(f => f.fieldDeclaration != null)
  5.     .map(_.fieldDeclaration)    // fields
  6.     .map(f =>
  7.         f.variableDeclaratorList.variableDeclarator.asScala
  8.          .map(g => new OMPVariable(g.variableDeclaratorId.Identifier.toString, f.unannType.toString, OMPVariableType.Class, ! f.fieldModifier.asScala.exists(m => m.getText == "public" || m.getText == "protected")))
  9.     )
  10.     .flatten
  11.     .toArray
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement