List of usage examples for javax.lang.model.element Modifier toString
public String toString()
From source file:com.codiscope.analyzer.JSONSerializer.java
/** * Write out {@code Modifier}s as a JSON array with a given key. * Do nothing if the value passed in is {@code null}. * * @param name The key name.//w w w. java 2s. c o m * @param nodes Modifiers to write out. */ public void outputMods(final String name, final Iterable<? extends Modifier> mods) { try { if (mods != null) { writer.key(name); writer.array(); for (final Modifier mod : mods) { writer.value(mod.toString()); } writer.endArray(); } } catch (final JSONException e) { throw new RuntimeException(e); } }