Interface JVarDeclaration

All Superinterfaces:
JAnnotatable, JCommentable, JDocCommentable

public interface JVarDeclaration extends JAnnotatable, JDocCommentable
A variable declaration.
Author:
David M. Lloyd
  • Method Details

    • type

      JType type()
      Get the variable type.
      Returns:
      the variable type
    • name

      String name()
      Get the variable name.
      Returns:
      the variable name
    • add

      JVarDeclaration add(String name, JExpr init)
      Add another item to this declaration. Subsequent items always have the same type as this item.
      Parameters:
      name - the variable name
      init - the variable initializer
      Returns:
      the subsequent declaration
    • add

      Add another item to this declaration. Subsequent items always have the same type as this item.
      Parameters:
      name - the variable name
      Returns:
      the subsequent declaration