@Override public String apply(Object input) { return StaticEnvironment.processing().getElementUtils().getConstantExpression(input); }
@Test public void elementUtils() { String oneHundredAndOne = model.elementUtils().getConstantExpression(101L); assertEquals("101L", oneHundredAndOne); }
@Override public String getConstantExpression(Object value) { return delegate.getConstantExpression(value); }
@Override public String getConstantExpression(Object value) { return this.elements.getConstantExpression(value); }
@Override public String getConstantExpression(Object value) { return elements.getConstantExpression(value); }
@Override public String getConstantExpression(Object value) { return delegate.getConstantExpression(value); }
public static String getConstantExpression(Object value) { return elements.getConstantExpression(value); }
public String getConstantExpression(Object value) { return elementUtils.getConstantExpression(value); }
public String getConstantExpression(Object value) { return env.getElementUtils().getConstantExpression(value); }
public String getConstantExpression(Object value) { return env.getElementUtils().getConstantExpression(value); }
@Override public PrintingElementVisitor visitVariable(VariableElement e, Boolean newLine) { ElementKind kind = e.getKind(); defaultAction(e, newLine); if (kind == ENUM_CONSTANT) writer.print(e.getSimpleName()); else { writer.print(e.asType().toString() + " " + e.getSimpleName() ); Object constantValue = e.getConstantValue(); if (constantValue != null) { writer.print(" = "); writer.print(elementUtils.getConstantExpression(constantValue)); } writer.println(";"); } return this; }
@Override public PrintingElementVisitor visitVariable(VariableElement e, Boolean newLine) { ElementKind kind = e.getKind(); defaultAction(e, newLine); if (kind == ENUM_CONSTANT) writer.print(e.getSimpleName()); else { writer.print(e.asType().toString() + " " + e.getSimpleName() ); Object constantValue = e.getConstantValue(); if (constantValue != null) { writer.print(" = "); writer.print(elementUtils.getConstantExpression(constantValue)); } writer.println(";"); } return this; }
@Override public PrintingElementVisitor visitVariable(VariableElement e, Boolean newLine) { ElementKind kind = e.getKind(); defaultAction(e, newLine); if (kind == ENUM_CONSTANT) writer.print(e.getSimpleName()); else { writer.print(e.asType().toString() + " " + e.getSimpleName() ); Object constantValue = e.getConstantValue(); if (constantValue != null) { writer.print(" = "); writer.print(elementUtils.getConstantExpression(constantValue)); } writer.println(";"); } return this; }
@Override public PrintingElementVisitor visitVariable(VariableElement e, Boolean newLine) { ElementKind kind = e.getKind(); defaultAction(e, newLine); if (kind == ENUM_CONSTANT) writer.print(e.getSimpleName()); else { writer.print(e.asType().toString() + " " + e.getSimpleName() ); Object constantValue = e.getConstantValue(); if (constantValue != null) { writer.print(" = "); writer.print(elementUtils.getConstantExpression(constantValue)); } writer.println(";"); } return this; }