## org.eclipse.jet.compiler
Class JET2ASTElement

    java.lang.Object
      org.eclipse.jet.compiler.JET2ASTElement

Direct Known Subclasses:
  Comment, JavaElement, JET2CompilationUnit, JET2Directive, TextElement, XMLBodyElementEnd, XMLElement

    public abstract class JET2ASTElement

extends java.lang.Object

An abstract class representing common aspects of all JET2 AST elements.

Method Summary
`abstract void` `accept(JET2ASTVisitor visitor)` Visit the AST and its contained elements.
`int` `getColumn()` Return the column number (one-based) at which the element starts.
`int` `getEnd()` The document relative offset of the first character after the element.
`int` `getLine()` Return the line (one-based) on which the element starts.
`JET2ASTElement` `getNextElement()`
`JET2ASTElement` `getParent()`
`JET2ASTElement` `getPrevElement()`
`int` `getStart()` The document relative offset of the start of the element.
`abstract boolean` `removeLineWhenOtherwiseEmpty()` Indicate whether the the surrounding whitespace, including the trailing new line should be removed from the template output.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getParent

    public final JET2ASTElement getParent()

  Returns:
    Returns the parent.

### getStart

    public final int getStart()

  The document relative offset of the start of the element.

  Returns:
    the start offset

### getEnd

    public final int getEnd()

  The document relative offset of the first character after the element.

  Returns:
    the end offset

### accept

    public abstract void accept(JET2ASTVisitor visitor)

  Visit the AST and its contained elements.

  Parameters:
    `visitor` -

### getLine

    public final int getLine()

  Return the line (one-based) on which the element starts.

  Returns:
    the line number.

### getNextElement

    public JET2ASTElement getNextElement()

### getPrevElement

    public JET2ASTElement getPrevElement()

### getColumn

    public final int getColumn()

  Return the column number (one-based) at which the element starts.

  Returns:
    the column number.

### removeLineWhenOtherwiseEmpty

    public abstract boolean removeLineWhenOtherwiseEmpty()

  Indicate whether the the surrounding whitespace, including the trailing new line should be removed from the template output. In general, elements that create output should return `false`, while element that do should should return `true`.

  Returns:
    `true` if the containing line should be removed if otherwise empty.

Copyright 2006 IBM Corporation and others. All Rights Reserved.