Class JFieldVar

All Implemented Interfaces:
JAnnotatable, JAssignmentTarget, JDeclaration, JDocCommentable, JExpression, JGenerable

public class JFieldVar extends JVar implements JDocCommentable
A field that can have a JDocComment associated with it
  • Field Details

  • Constructor Details

    • JFieldVar

      JFieldVar(JDefinedClass owner, JMods mods, JType type, String name, JExpression init)
      JFieldVar constructor
      Parameters:
      type - Datatype of this variable
      name - Name of this variable
      init - Value to initialize this variable to
  • Method Details

    • name

      public void name(String name)
      Description copied from class: JVar
      Changes the name of this variable.
      Overrides:
      name in class JVar
    • javadoc

      public JDocComment javadoc()
      Creates, if necessary, and returns the class javadoc for this JDefinedClass
      Specified by:
      javadoc in interface JDocCommentable
      Returns:
      JDocComment containing javadocs for this class
    • declare

      public void declare(JFormatter f)
      Specified by:
      declare in interface JDeclaration
      Overrides:
      declare in class JVar