public class AstToTextHelper
extends Object
Helper class for converting AST into text.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static String |
getClassText(ClassNode node)Renders node without generics. |
|
public static String |
getModifiersText(int modifiers)Renders the modifier bits of modifiers as keywords, in this
order: private, protected, public, static, abstract, final,
interface, native, synchronized, transient, volatile. |
|
public static String |
getParameterText(Parameter node)Renders node as type name, plus = and the
initial expression when one is present. |
|
public static String |
getParametersText(Parameter[] parameters)Joins getParameterText for each parameter with ", ".
|
|
public static String |
getThrowsClauseText(ClassNode[] exceptions)Renders a throws clause, including the leading space. |
Renders node without generics. A null node is rendered as
<unknown>.
node - class to render, or nullnode.toString(false), or <unknown> Renders the modifier bits of modifiers as keywords, in this
order: private, protected, public, static, abstract, final,
interface, native, synchronized, transient, volatile. Bits outside
that set are ignored.
modifiers - JVM access flags Renders node as type name, plus = and the
initial expression when one is present. A null parameter, or a
parameter with a null name, uses <unknown> for that part.
node - parameter to render, or null Joins getParameterText for each parameter with ", ".
A null or empty array is an empty string.
parameters - parameters to render, or null