JavaField
Date: 2017-03-29

com.thoughtworks.qdox.model

## Class JavaField

- java.lang.Object
- - com.thoughtworks.qdox.model.AbstractBaseJavaEntity
  - - com.thoughtworks.qdox.model.AbstractJavaEntity
    - - com.thoughtworks.qdox.model.JavaField

- All Implemented Interfaces:
    Member, java.io.Serializable, java.lang.Comparable

      public class JavaField
      extends AbstractJavaEntity
      implements Member

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity

      `modifiers`

    - ### Fields inherited from class com.thoughtworks.qdox.model.AbstractBaseJavaEntity

      `name, parent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JavaField()`
    `JavaField(java.lang.String name)`
    `JavaField(Type type, java.lang.String name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(java.lang.Object o)`
    `java.lang.String` | `getCallSignature()`
    `java.lang.String` | `getDeclarationSignature(boolean withModifiers)`
    `java.lang.String` | `getInitializationExpression()` Get the original expression used to initialize the field.
    `Type` | `getType()`
    `void` | `setInitializationExpression(java.lang.String initializationExpression)`
    `void` | `setType(Type type)`
    `java.lang.String` | `toString()`
    `protected void` | `writeBody(IndentBuffer result)`

    - ### Methods inherited from class com.thoughtworks.qdox.model.AbstractJavaEntity

      `getCodeBlock, getComment, getModifiers, getNamedParameter, getParentClass, getSource, getTagByName, getTags, getTagsByName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setComment, setModifiers, setParentClass, setTags, write, writeAccessibilityModifier, writeAllModifiers, writeNonAccessibilityModifiers`

    - ### Methods inherited from class com.thoughtworks.qdox.model.AbstractBaseJavaEntity

      `getAnnotations, getLineNumber, getName, getParent, setAnnotations, setLineNumber, setName, setParent`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### JavaField

          public JavaField()

    - #### JavaField

          public JavaField(java.lang.String name)

    - #### JavaField

          public JavaField(Type type,
                   java.lang.String name)

  - ### Method Detail

    - #### getType

          public Type getType()

    - #### writeBody

          protected void writeBody(IndentBuffer result)

      Specified by:
        `writeBody` in class `AbstractJavaEntity`

    - #### setType

          public void setType(Type type)

    - #### compareTo

          public int compareTo(java.lang.Object o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable`

    - #### getDeclarationSignature

          public java.lang.String getDeclarationSignature(boolean withModifiers)

      Specified by:
        `getDeclarationSignature` in interface `Member`

    - #### getCallSignature

          public java.lang.String getCallSignature()

      Specified by:
        `getCallSignature` in interface `Member`

    - #### getInitializationExpression

          public java.lang.String getInitializationExpression()

      Get the original expression used to initialize the field.
      Returns:
        initialization as string.

    - #### setInitializationExpression

          public void setInitializationExpression(java.lang.String initializationExpression)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`
      See Also:
        `http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Field.html#toString()`