Groovy Documentation

groovy.org.codenarc.rule.formatting
[Groovy] Class AbstractSpaceAroundBraceAstVisitor

java.lang.Object
  org.codenarc.rule.AbstractAstVisitor
      groovy.org.codenarc.rule.formatting.AbstractSpaceAroundBraceAstVisitor

abstract class AbstractSpaceAroundBraceAstVisitor
extends AbstractAstVisitor

Abstract superclass for AstVisitor classes dealing with space around braces

Authors:
Chris Mair


Method Summary
protected int indexOfClosingBrace(String line, int blockLastColumn)

protected boolean isNotCharacter(String line, char c, int index)

protected boolean isNotInsideGString()

protected boolean isNotWhitespace(String line, int index)

Return true if the specified (1-based) index is valid and the character at that index is not a whitespace character

protected String lastSourceLineOrEmpty(def node)

protected String sourceLineOrEmpty(def node)

void visitGStringExpression(org.codehaus.groovy.ast.expr.GStringExpression expression)

 

Method Detail

indexOfClosingBrace

protected int indexOfClosingBrace(String line, int blockLastColumn)


isNotCharacter

protected boolean isNotCharacter(String line, char c, int index)


isNotInsideGString

protected boolean isNotInsideGString()


isNotWhitespace

protected boolean isNotWhitespace(String line, int index)
Return true if the specified (1-based) index is valid and the character at that index is not a whitespace character
Returns:
true only if the character is not a whitespace character
Parameters:
line - - the source line to be checked
index - - the 1-based index of the character to be checked


lastSourceLineOrEmpty

protected String lastSourceLineOrEmpty(def node)


sourceLineOrEmpty

protected String sourceLineOrEmpty(def node)


visitGStringExpression

@Override
void visitGStringExpression(org.codehaus.groovy.ast.expr.GStringExpression expression)


 

Groovy Documentation